
94 Wn.2d 314 (1980)
616 P.2d 1233
In the Matter of the Personal Restraint of ROBERT R. SCHELLONG, Petitioner.
No. 46922.
The Supreme Court of Washington, En Banc.
September 18, 1980.
*315 Stan Taylor and Steve Scott of Institutional Legal Services, for petitioner.
George F. Hanigan, Prosecuting Attorney, and Fred A. Johnson, for respondent.
BRACHTENBACH, J.
Petitioner, a juvenile, filed in the Court of Appeals a personal restraint petition. It was certified to this court. We deny the petition.
In 1978, petitioner violated his parole from previous convictions by leaving a group home. The State charged that during the following 6-week period while he was sought by police, he committed 10 offenses of burglary and theft. The locations of the 10 offenses were distributed in a random fashion between Cowlitz and Wahkiakum counties.
Petitioner entered in Cowlitz County a plea of guilty to four charges of second degree burglary and one charge of taking a vehicle without the owner's permission. Pursuant to RCW 13.40.060(2), he was transferred for disposition to the place of his residence, Wahkiakum County. There he was charged with four counts of burglary and one count of second degree theft. Based on a plea bargain, he pleaded guilty to one count of second degree burglary. Disposition of all offenses was made at one hearing in Wahkiakum County.
On the Cowlitz County charges, the court committed petitioner to the Department of Social and Health Services (DSHS) for 60 weeks. Then, taking into account the Cowlitz offenses which had occurred prior to the Wahkiakum offenses, the court imposed a 21-month confinement for the latter charge to run consecutively to the 60-week confinement.
Petitioner was no stranger to the juvenile system. Between January 1977 and September 1978, he had been found guilty of 1 felony, 7 gross misdemeanors and 1 misdemeanor. Those charges ranged from malicious mischief to theft to possession of alcohol. In these proceedings, he was charged with 10 felonies, consisting of 8 burglaries, 1 theft *316 and 1 auto theft. At the disposition hearing, he signed a statement, in open court, which acknowledged that the prosecuting attorney recommended a 2-year confinement on the Wahkiakum charge plus a specified enhancement (discussed hereafter). That statement was signed in the presence of petitioner's lawyer, the prosecutor and the judge; they all signed the statement.
Petitioner challenges the use of the Cowlitz offenses to enhance the sentence on the Wahkiakum offense. Briefly, he challenges the use of the Cowlitz charges as a "criminal history" as defined in RCW 13.40.020(6). Use of that criminal history leads to an enhanced sentence beyond what he would otherwise normally have received on the Wahkiakum charge.
RCW 13.40.180 provides:
Where a disposition is imposed on a youth for two or more offenses, the terms shall run consecutively, subject to the following limitations: ... the aggregate of all consecutive terms shall not exceed three hundred percent of the term imposed for the most serious offense.
This statute contemplates that while some offenses may be considered prior criminal history, certain other offenses must be grouped together when imposing a sentence. Apparently any crimes for which the youth was arrested and charged before committing the offenses under consideration are to be considered prior criminal history, as long as the youth was also convicted of these crimes before sentencing for the subsequent crimes. On the other hand, the crimes that apparently must be grouped together for sentencing are those that were committed before the arresting and charging for the crimes under consideration but after the previous arresting and charging, if any.
Petitioner claims that he was sentenced separately on crimes that should have been grouped together. He claims that this is inconsistent with the proper construction of the Juvenile Justice Act of 1977, RCW 13.40, and that it violated his constitutional right to equal protection.
*317 [1] Petitioner did not appeal his disposition sentences. He contends that he could not have appealed his sentence because disposition was within the standard range of the guidelines promulgated by DSHS pursuant to RCW 13.40.030. He relies upon this language in RCW 13.40.160(1):
A disposition within the standard range is not appealable under RCW 13.40.230 as now or hereafter amended.
This overlooks the entire scheme of appeal in the statute. Like much of this act it is somewhat confusing, but an examination of the original act clarifies appeal rights. Reference is to Laws of 1977, 1st Ex. Sess., ch. 291. Section 5 (RCW 13.04.033) provides:
Any person aggrieved by a final order of the juvenile court may appeal said order as provided by this section.... Except as otherwise provided in this title, all appeals in matters related to the commission of a juvenile offense shall be taken in the same manner as criminal cases and the right to collateral relief shall be the same as in criminal cases.
Section 70 is the source of RCW 13.40.160(1), supra. But section 70 also provides:
A disposition imposed outside a standard range is appealable under section 77 of this 1977 amendatory act by the state or the respondent.
Section 77 (RCW 13.40.230) grants an accelerated review of dispositions under section 70. By its very language, appeals pursuant to section 77 are limited to those appeals allowed by section 70 which are restricted to dispositions outside the standard range where the court finds "manifest injustice" (defined in RCW 13.40.020(12)).
The basic right of appeal is in RCW 13.04.033 (section 5 of the act). Appeals outside the standard range under RCW 13.40.160(1) (section 70 of the act) are granted a special appellate procedure pursuant to RCW 13.40.230 (section 77 of the act). Thus, petitioner did have a right of appeal under RCW 13.04.033, but not under the special terms of RCW 13.40.230.
*318 [2] Hence his challenge to an unappealed disposition is a collateral attack. This is not permitted for nonconstitutional issues. In re Myers, 91 Wn.2d 120, 587 P.2d 532 (1978); State v. Wicke, 91 Wn.2d 638, 591 P.2d 452 (1979). Even though the sentencing statute may have been incorrectly applied, the petition must be dismissed to the extent that it is based upon a statutory interpretation of RCW 13.40.
Petitioner does raise properly an equal protection challenge to the statute and disposition standards adopted by DSHS. We must therefore decide whether the construction of the statute that was applied below denied him equal protection under the federal and state constitutions.
To analyze the equal protection matter, it is necessary to examine the statutory scheme affecting petitioner.
Juvenile proceedings are to be commenced in the county where the juvenile resides. However, proceedings may be commenced in the county where an element of the alleged offense occurred if so requested by (1) the juvenile or (2) the prosecuting attorney of the county where the incident occurred. RCW 13.40.060(1). If the hearing is to be held in the offense county, the court has discretion to refer the matter to the residence county for disposition. RCW 13.40.060(2).
Before entering a disposition order, the court must hold a disposition hearing. The statute sets out numerous factors to be considered by the court, including specified mitigating or aggravating factors. The latter includes recent criminal history. Listed are five factors which may not be considered. RCW 13.40.150.
RCW 13.40.160 prescribes and proscribes the disposition by the court. When the juvenile is found to be a serious offender, as here, subsection (1) requires the court to commit the offender to DSHS for the standard range of disposition for the offense. This refers to a range determined by applying the standards adopted by DSHS. However, if the court concludes, and enters reasons for its conclusion, that disposition within the standard range would effectuate a *319 "manifest injustice", the court shall impose a disposition outside the standard range.
In this case, based on the trial court's construction of the act, the disposition orders were within the standard range of guidelines including an increase factor due to the criminal history. The act limits, for multiple offenses, the aggregate of all consecutive terms to 300 percent of the term imposed for the most serious offense. RCW 13.40.180.
[3] The essence of petitioner's argument is that the trial court's construction of the statute and guidelines requires disparate punishments for exactly the same offenses. He calculates that if all his crimes had been adjudicated in one hearing, his maximum suggested confinement would have been 60 weeks. However, because he had been adjudicated first on some of the crimes, the trial court's interpretation of the enhancement provisions subjected him to a suggested maximum of approximately 150 weeks upon adjudication on the remaining crimes.
Petitioner relies upon State v. Zornes, 78 Wn.2d 9, 475 P.2d 109 (1970) and Olsen v. Delmore, 48 Wn.2d 545, 295 P.2d 324 (1956). Both of these cases held that it is a violation of equal protection to grant to the prosecutor the discretion to charge the exact same acts as either a misdemeanor or a felony. But in the case at bar, the prosecutor is given no discretion to characterize the severity of the crimes. Upon adjudication of guilt, the list of convicted offenses is exactly the same whether the offenses were charged and tried all at once or one at a time.
The only effect that the prosecutor can have, under the trial court's interpretation of the statute, is that the suggested sentence under the guidelines would vary according to whether the prosecutor charges multiple offenses in groups or all at once. Although this discretion might reach the level of a violation of equal protection if the trial judge were bound to simply follow the guidelines, just as the trial judge was bound to sentence according to the statutes in Zornes and Olsen, that is not the case here. The Juvenile Justice Act of 1977 contains a safety valve which places *320 discretion in the trial judge and overrides this small amount of discretion that the trial court's interpretation of the statute would place in the prosecutor. The trial judge has the discretion to impose a sentence outside of the standard range if he finds this is necessary to avoid "manifest injustice". RCW 13.40.160(4)(c).
Because the trial judge has a discretion in sentencing which can override any effect that the prosecutor might have on the recommended sentence, this case falls under the rule of State v. Boggs, 57 Wn.2d 484, 358 P.2d 124 (1961). See also Jansen v. Morris, 87 Wn.2d 258, 551 P.2d 743 (1976); State v. Barton, 75 Wn.2d 947, 950, 454 P.2d 381 (1969). In Boggs, we held that a discretion lodged in the trial judge to set the maximum sentence at anywhere from a fine of one thousand dollars, to 1 year in the county jail, or to life imprisonment does not violate equal protection. The trial judge should be able to tailor the sentence to the individual criminal. Thus, there was no denial of equal protection.
In this case, the sentence that was recommended by the prosecutor was part of the agreement which resulted from the plea bargaining. The trial judge did not impose a greater sentence than the prosecutor's recommendation. Petitioner does not argue here, and does not claim to have argued below, that the sentence imposed constitutes a manifest injustice.
The personal restraint petition is denied.
UTTER, C.J., and ROSELLINI, STAFFORD, WRIGHT, HOROWITZ, DOLLIVER, HICKS, and WILLIAMS, JJ., concur.
Reconsideration denied November 3, 1980.
