
27 Wn. App. 544 (1980)
619 P.2d 699
THE STATE OF WASHINGTON, Respondent,
v.
EDWARD ALLEN WALKER, Appellant.
No. 4119-II.
The Court of Appeals of Washington, Division Two.
October 27, 1980.
T. Jeffrey Keane, for appellant.
James Carty, Prosecuting Attorney, and Roger A. Bennett, Deputy, for respondent.
PEARSON, J.
Edward Allen Walker appeals his conviction under RCW 9A.76.110 for first degree escape. The *546 determinative issue is whether the escape statute was violated when defendant departed from a private residential treatment facility to which he had been confined as a condition of probation.
We hold that the confinement in such a facility is not specifically authorized by the probation statue (RCW 9.95.210), nor is such confinement authorized as a prescribed punishment for burglary. Consequently, defendant's departure from the facility was at most a violation of a condition of his probation. It does not, however, constitute the crime of escape. We therefore reverse the conviction.
On October 6 and December 1, 1978, defendant pleaded guilty to separate counts of burglary in the second degree.[1] The two convictions were consolidated for sentencing purposes. On February 9, 1979, the trial court entered a judgment and sentence on one conviction, suspending it on the condition, among others, that defendant
enter into and complete the Residential Treatment Facility Program, and be detained in, and under the restraint of, and in the custody of the Residential Treatment Facility [RTF] until further order of the Court.
For the second conviction, the trial court entered an order deferring sentence and placing defendant on probation. As part of this order, the court imposed a 1-year term in the county jail, suspended while defendant remained in the custody of the RTF, as ordered above. Counsel for the State made clear to this court in oral argument that these orders were specifically drafted to give rise to an escape charge should defendant leave the RTF without permission.
The RTF is a private minimum security facility located in Vancouver, Washington. Defendant entered the RTF on February 12, 1979. On February 24, however, defendant left the facility without permission. He was subsequently *547 apprehended and charged with first degree escape for leaving the RTF in violation of court order. A jury found defendant guilty, and the trial court sentenced him to the maximum term of imprisonment.
RCW 9A.76.110 provides in part:
A person is guilty of escape in the first degree if, being detained pursuant to a conviction of a felony, he escapes from custody or a detention facility.
A "detention facility" is inter alia, "any place used for the confinement of a person ... pursuant to an order of a court". RCW 9A.76.010(2).
[1] The State argues defendant was confined to a "detention facility" pursuant to the court's probation order. Consequently, his departure satisfies the elements of the escape statute. We disagree. Any such court order of custody or detention must necessarily be a legislatively authorized sanction in order to trigger the escape statute. It is a legislative and not a judicial function to define criminal conduct and prescribe punishment. McInturf v. Horton, 85 Wn.2d 704, 538 P.2d 499 (1975).
[2] RCW 9.95.210 provides in part:
The court in granting probation, may suspend the imposing or the execution of the sentence and may direct that such suspension may continue for such period of time, not exceeding the maximum term of sentence, except as hereinafter set forth and upon such terms and conditions as it shall determine.

The court in the order granting probation and as a condition thereof, may in its discretion imprison the defendant in the county jail for a period not exceeding one year ...
(Italics ours.) Under this statute, only one type of confinement is authorized as a condition of probation, namely, not more than 1 year in the county jail. While the court is given broad discretion to impose conditions upon grants of probation, the last sentence of this statute clearly places a limitation upon that discretion.
[3, 4] Courts should not read into a statute matters which are not there, nor may the court modify a statute by *548 construction. King County v. Seattle, 70 Wn.2d 988, 425 P.2d 887 (1967). The court's primary object in interpreting a statute is to ascertain and effectuate the intent of the legislature. Janovich v. Herron, 91 Wn.2d 767, 592 P.2d 1096 (1979). Also, criminal statutes must be strictly construed against the State and in favor of the accused. State v. Bell, 83 Wn.2d 383, 518 P.2d 696 (1974); State v. Ross, 20 Wn. App. 448, 580 P.2d 1110 (1978).
[5] Applying these principles to the facts of this case, we hold the last sentence of the probation statute places a limitation on the broad authority granted to the court by the first sentence of RCW 9.95.210 to impose conditions on the grant of probation. Accordingly, we hold defendant was not "confined" pursuant to a lawful order of the court, the violation of which would trigger an escape charge under RCW 9A.76.110.
On the other hand, we do not hold the trial court imposed an unreasonable condition of probation in this case. State v. Langford, 12 Wn. App. 228, 529 P.2d 839 (1974); State v. Barklind, 12 Wn. App. 818, 532 P.2d 633 (1975). We hold the court could properly order defendant to receive treatment at RTF as a condition of probation. If defendant failed to follow the rules and regulations of RTF, the court would be justified in revoking his probation. RCW 9.95.220-.230. However, we hold that adding the crime of escape as a penalty for violating the condition of probation was not proper.
[6] The State argues defendant is now attacking his sentencing orders collaterally, they being final orders from which an appeal must be filed within 30 days.[2] RAP 5.2(a). We disagree. The State must prove every element of the crime charged beyond a reasonable doubt. In re Winship, 397 U.S. 358, 25 L.Ed.2d 368, 90 S.Ct. 1068 (1970). An essential element of first degree escape is that the accused escaped either from lawful custody or from a detention *549 facility to which he was confined pursuant to a lawful court order. Defendant's challenge to the validity of his sentencing orders is not collateral, since it is directed to the State's use of the prior orders to prove an essential element of the crime presently being charged. See State v. Holsworth, 93 Wn.2d 148, 607 P.2d 845 (1980). Accord, State v. Swindell, 93 Wn.2d 192, 607 P.2d 852 (1980); State v. Rinier, 93 Wn.2d 309, 609 P.2d 1358 (1980).
Because of our holding, we need not address defendant's other assignments of error. Defendant's conviction is reversed.
REED, C.J., and PETRICH, J., concur.
NOTES
[1]  RCW 9A.52.030 provides that second degree burglary is a class B felony. RCW 9A.20.020(1)(b) sets the punishment for class B felonies as "imprisonment in a state correctional institution for a maximum term of not more than ten years, or by a fine in an amount fixed by the court of not more than ten thousand dollars, or by both such imprisonment and fine;"
[2]  The two sentencing orders were entered on February 9, 1979. Defendant filed a notice of appeal on June 1, 1979.
