
98 Ill.2d 237 (1983)
456 N.E.2d 11
THE PEOPLE OF THE STATE OF ILLINOIS, Appellant,
v.
RANDALL C. KAEDING, Appellee.
No. 57288.
Supreme Court of Illinois.
Opinion filed September 23, 1983.
Rehearing denied December 2, 1983.
*238 *239 Neil F. Hartigan and Tyrone C. Fahner, Attorneys General, of Springfield (Patricia Rosen, Assistant Attorney General, of Chicago, of counsel), for the People.
Frank Wesolowski, Jr., Public Defender, and Eugene A. Wojcik, Jr., Deputy Public Defender, both of Wheaton, for appellee.
Reversed and remanded.
JUSTICE UNDERWOOD delivered the opinion of the court:
Defendant, Randall Kaeding, pleaded guilty but mentally ill to the offense of indecent liberties with a child and was sentenced by the Du Page County circuit court to nine years' imprisonment. Citing section 5-2-6 of the Unified Code of Corrections (Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-6), that court also ordered the Department of Corrections to provide intensive psychotherapy or, if necessary, to transfer defendant to the Department of Mental Health and Developmental Disabilities for that treatment. In addition, the December 17, 1981, sentencing *240 order stated that either department would be required to file a treatment plan with the court within 60 days. On May 14, 1982, the Department of Corrections alternatively moved the court to vacate that order or to amend it. On May 24 defendant apparently filed his own motion to vacate or amend the order, and on June 30 filed another motion seeking to withdraw his guilty plea or amend his sentence. The circuit court vacated the sentencing order on June 30 and docketed the matter for resentencing. After a second sentencing hearing, the court concluded that it lacked jurisdiction to modify the original sentencing order and reaffirmed that order. The court went on to find that a portion of section 5-2-6 was void because of a constitutional infirmity, and the Department of Corrections on September 13 appealed that ruling directly to this court pursuant to Rule 302(a) (87 Ill.2d R. 302(a)). On October 1 defendant filed another motion to withdraw his plea or modify the sentence.
We are met at the outset with a jurisdictional question. We allowed defendant leave to file a motion to strike the Department's appeal, and he contends, apparently because the Department's motion was not filed within 30 days of the entry of the sentencing order, that the circuit court lacked jurisdiction to reaffirm that order and declare part of section 5-2-6 unconstitutional. The Department, however, persuasively argues that the circuit court had jurisdiction pursuant to the revestment doctrine. Under the narrow terms of that well-established rule, litigants may revest a court which has general jurisdiction over the matter with both personal and subject matter jurisdiction over the particular cause after the 30-day period following final judgment during which post-judgment motions must ordinarily be filed. (Ridgely v. Central Pipe Line Co. (1951), 409 Ill. 46, 49; Brown v. Miner (1951), 408 Ill. 123, 126; Craven v. Craven *241 (1950), 407 Ill. 252, 255; Rossiter v. Soper (1943), 384 Ill. 47, 59-60; Weisguth v. Supreme Tribe of Ben Hur (1916), 272 Ill. 541, 543; Grand Pacific Hotel Co. v. Pinkerton (1905), 217 Ill. 61, 83-84. Cf. Sears v. Sears (1981), 85 Ill.2d 253, 260.) Although this court has not had occasion to apply the revestment doctrine in recent years (cf. Sears v. Sears (1981), 85 Ill.2d 253, 260), it enjoys continued vitality in our appellate court. See, e.g., Sabatino v. Kozy Kottage Inn, Inc. (1981), 102 Ill. App.3d 375, 378; Slavick v. Michael Reese Hospital & Medical Center (1980), 92 Ill. App.3d 161, 166; Halleck v. Trumfio (1980), 85 Ill. App.3d 1051, 1055; Faust v. Michael Reese Hospital & Medical Center (1979), 79 Ill. App.3d 69, 72-73.
In order for the rule to apply, the parties must actively participate without objection in proceedings which are inconsistent with the merits of the prior judgment. (See Sears v. Sears (1981), 85 Ill.2d 253, 260; Ridgely v. Central Pipe Line Co. (1951), 409 Ill. 46, 50.) Although the circuit court's order which vacated the original sentencing order recited that jurisdiction was based on motions filed by both the Department and defendant, there is no indication in the record that defendant ever objected to the exercise of jurisdiction in connection with the Department's motion, and it is clear that defendant's participation in the proceedings was not only active but extensive. Furthermore, unlike the situation in Sears v. Sears (1981), 85 Ill.2d 253, where this court recently refused to apply the revestment doctrine because the merits of the previously entered judgment were not opposed in the subsequent proceedings, the Department's motion specifically attacked the substance of the circuit court's sentencing order. Under these circumstances, defendant waived any right to challenge the Department's motion and the circuit court was revested with jurisdiction over the parties.
*242 In support of his motion to strike the Department's appeal, defendant also contends that the circuit court's second sentencing order "merely reaffirmed" the original order. In addition, defendant characterizes the appeal as an impermissible interlocutory appeal, arguing that two motions seeking leave to withdraw his guilty plea or to amend the sentence are still pending in the circuit court. Both of these contentions lack merit. The terms of the second sentencing order reaffirming the original order obviously went far beyond the first order because of the ruling in the second order holding part of section 5-2-6 unconstitutional. Furthermore, an examination of the record reveals that the first of defendant's motions was ruled upon by the circuit court as it served, along with the Department's motion, as the basis for the court's order vacating the original sentencing order. We note, too, that the circuit court's reaffirmance of its original sentencing order, serving to fully adjudicate the rights of the parties, constituted a final judgment. (See Wilkey v. Illinois Racing Board (1983), 96 Ill.2d 245; People ex rel. Scott v. Silverstein (1981), 87 Ill.2d 167, 171. Cf. People v. Allen (1978), 71 Ill.2d 378, 381; People v. Warship (1974), 59 Ill.2d 125, 130.) Because defendant's October 1 motion was not filed until after the Department had filed its notice of appeal, there were no motions pending, and the appeal was not interlocutory in nature.
When ruling that section 5-2-6 was unconstitutionally infirm, the circuit court stated:
"The Court further finds that Chapter 38, sec. 1005-2-6(e)(1) creates a class of offender who, although found guilty but mentally ill, is not required to submit to a course of mental treatment by the sentencing Court, distinguished only by virtue of said offender's confinement within a facility of the Illinois Department of Corrections, while all other like offenders are required to submit to a course of mental treatment prescribed by the sentencing *243 Court; that this classification bears no reasonable relationship to any legitimate State interest and is unconstitutional and void."
The relevant portions of section 5-2-6 provide:
"(a) * * * The court may impose any sentence upon the defendant which could be imposed pursuant to law upon a defendant who had been convicted of the same offense without a finding of mental illness.
(b) If the court imposes a sentence of imprisonment upon a defendant who has been found guilty but mentally ill, the defendant shall be committed to the Department of Corrections, which shall cause periodic inquiry and examination to be made concerning the nature, extent, continuance, and treatment of the defendant's mental illness. The Department of Corrections shall provide such psychiatric, psychological, or other counseling and treatment for the defendant as it determines necessary.
* * *
(e)(1) All persons found guilty but mentally ill, whether by plea or by verdict, who are placed on probation or sentenced to a term of periodic imprisonment or a period of conditional discharge shall be required to submit to a course of mental treatment prescribed by the sentencing court.
(2) The course of treatment prescribed by the court shall reasonably assure the defendant's satisfactory progress in treatment or habilitation and for the safety of the defendant and others. The court shall consider terms, conditions and supervision which may include, but need not be limited to, notification and discharge of the person to the custody of his family, community adjustment programs, periodic checks with legal authorities and outpatient care and utilization of local mental health or developmental disabilities facilities." (Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-6.)
As pointed out during oral argument, it is apparent that the circuit court inadvertently cited the wrong subsection as the court's findings clearly refer to subsection (b).
In support of the circuit court's finding, defendant argues that all persons who are sentenced under section 5-2-6 *244 must have been found by the court to have been "mentally ill at the time of the offense to which the plea is entered." (See Ill. Rev. Stat. 1981, ch. 38, pars. 115-2, 115-3.) Consequently, asserts defendant, these persons are all members of a single class which must receive similar treatment. Defendant additionally contends that this court must strictly scrutinize section 5-2-6 when evaluating the circuit court's ruling because the statute implicates the fundamental right to fair treatment in criminal proceedings guaranteed by due process.
As we understand defendant's argument, he interprets the provision in section 5-2-6(e)(1) that "All persons found guilty but mentally ill [but not imprisoned] * * * shall be required to submit to a course of mental treatment prescribed by the sentencing court" (Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-6(e)(1)) as requiring the court to prescribe treatment for every mentally ill defendant who is not sentenced to prison. Conversely, the provision of section 5-2-6(b) that the Department "shall provide such * * * treatment for the [imprisoned] defendant as it determines necessary" (Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-6(b)) is interpreted by him as permitting the Department, as it has done in his case, to determine that treatment would, in a given case, be neither necessary nor helpful. Thus, urges defendant, there exists an invidious discrimination in the differing treatment given members of the single class of mentally ill defendants.
In our opinion defendant misinterprets section 5-2-6(e)(1) in construing it as mandating the court to provide a course of treatment for every nonincarcerated defendant. The language of that section is not that the court must provide but, rather, that "All persons found guilty but mentally ill * * * shall be required to submit to * * *" treatment. In our judgment the legislature did not intend that either the court or the Department would be required to utilize limited resources, facilities and skilled personnel in *245 treating those defendants, imprisoned or otherwise, for whom treatment would not be helpful. No other conclusion seems compatible with section 5-2-6(a), authorizing the court to impose upon a defendant found guilty but mentally ill the same sentence it might impose upon a defendant found guilty but not mentally ill. Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-6(a).
While our interpretation of the statute disposes of defendant's argument, it does not completely resolve the problem troubling the trial judge. He seems to suggest that equal protection guarantees preclude dividing the responsibility for determining the treatment to be given imprisoned, as contrasted to nonimprisoned, defendants, a suggestion with which we do not agree.
Under the legislative plan before us it is clear that the difference in the way incarcerated and nonincarcerated defendants are treated lies only in the entity which is empowered to make the determination as to what course of medical treatment would be appropriate. When examining a legislative scheme which creates classifications by providing for different treatment of groups of persons, this court adheres to the framework of analysis used by the Supreme Court. (See Illinois Polygraph Society v. Pellicano (1980), 83 Ill.2d 130, 138; People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88, 96-97.) Generally, "courts restrict their role to determining whether the particular legislative classification is rationally designed to further a legitimate State purpose." (People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88, 96, citing Maher v. Roe (1977), 432 U.S. 464, 470, 53 L.Ed.2d 484, 492, 97 S.Ct. 2376, 2381; San Antonio Independent School District v. Rodriguez (1973), 411 U.S. 1, 17, 36 L.Ed.2d 16, 33, 93 S.Ct. 1278, 1288.) When the legislation threatens fundamental constitutional rights or is directed towards a "suspect" group, then  and only then  courts will examine the statute to insure that it is "`tailored' narrowly to serve legitimate objectives" (San Antonio *246 Independent School District v. Rodriguez (1973), 411 U.S. 1, 17, 36 L.Ed.2d 16, 33, 93 S.Ct. 1278, 1288) in furtherance of compelling government interests. See Carey v. Population Services International (1977), 431 U.S. 678, 687, 52 L.Ed.2d 675, 686, 97 S.Ct. 2010, 2016; Shapiro v. Thompson (1969), 394 U.S. 618, 634, 22 L.Ed.2d 600, 615, 89 S.Ct. 1322, 1331; Village of Oak Lawn v. Marcowitz (1981), 86 Ill.2d 406, 416.
In our judgment, section 5-2-6 neither threatens a fundamental constitutional right nor is directed toward a "suspect" class, and our inquiry is accordingly limited to a determination of whether section 5-2-6 has a rational basis. "Fundamental interests generally are those that lie at the heart of the relationship between the individual and a republican form of nationally integrated government" (People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88, 97), and are rooted in explicit or implicit constitutional guarantees. (See San Antonio Independent School District v. Rodriguez (1973), 411 U.S. 1, 33-34, 36 L.Ed.2d 16, 43, 93 S.Ct. 1278, 1297.) This court, in keeping with the view of the Supreme Court, has previously recognized a responsibility not to engage in the creation of substantive constitutional rights "`* * * in the name of guaranteeing equal protection of the laws.'" (In re Roger B. (1981), 84 Ill.2d 323, 327, quoting San Antonio Independent School District v. Rodriguez (1973), 411 U.S. 1, 33, 36 L.Ed.2d 16, 43, 93 S.Ct. 1278, 1297.) We cannot agree with defendant that the fundamental right to fair treatment in the criminal process encompasses the right to judicial, instead of executive, supervision over rehabilitative programs for incarcerated defendants. Defendant does not argue that incarcerated persons form a "suspect" class, and we note that the decisions of this court and of the Supreme Court indicate that such an argument would lack merit. See Bell v. Wolfish (1979), 441 U.S. 520, 60 L.Ed.2d 447, 99 S.Ct. 1861; Jones v. North Carolina Prisoners' Labor Union, Inc. *247 (1977), 433 U.S. 119, 53 L.Ed.2d 629, 97 S.Ct. 2532; Estelle v. Dorrough (1975), 420 U.S. 534, 43 L.Ed.2d 377, 95 S.Ct. 1173; McGinnis v. Royster (1973), 410 U.S. 263, 35 L.Ed.2d 282, 93 S.Ct. 1055; People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88.
Because a statute carries a presumption of rationality when undergoing the traditional equal protection examination (see Illinois Polygraph Society v. Pellicano (1980), 83 Ill.2d 130, 137; People v. Warren (1977), 69 Ill.2d 620, 627-28), it is the defendant's burden to demonstrate the impermissible nature of the classification created. (See People v. Pembrock (1976), 62 Ill.2d 317, 322. Cf. People ex rel. City of Canton v. Crouch (1980), 79 Ill.2d 356, 370; Pozner v. Mauck (1978), 73 Ill.2d 250, 255.) Defendant does not offer any persuasive reasons as to why we should view section 5-2-6 as irrational, and we consider the statutory allocation of power over rehabilitative programs to be a rational means of furthering the legislative purposes underlying the Unified Code of Corrections. One of those purposes is to "prescribe sanctions proportionate to the seriousness of the offenses and permit the recognition of differences in rehabilitation possibilities among individual offenders." (Ill. Rev. Stat. 1981, ch. 38, par. 1001-1-2(a).) Section 5-2-6 is clearly designed with that purpose in mind, as it provides a wide range of sanctions and allocates the decision-making power concerning treatment programs to the entity having custody and responsibility for supervising the defendant, a provision which strikes us as eminently sensible. Indeed, by vesting the Department with the power to determine a defendant's needs and to implement treatment, the statute reflects the well-established view that the judiciary is ill equipped to supervise and evaluate the treatment of incarcerated defendants. See, e.g., Jones v. North Carolina Prisoners' Labor Union, Inc. (1977), 433 U.S. 119, 126, 53 L.Ed.2d 629, 639, 97 S.Ct. 2532, 2538; Meachum v. Fano (1976), 427 U.S. 215, *248 229, 49 L.Ed.2d 451, 461, 96 S.Ct. 2532, 2540; Procunier v. Martinez (1974), 416 U.S. 396, 405, 40 L.Ed.2d 224, 235, 94 S.Ct. 1800, 1807; People v. Williams (1977), 66 Ill.2d 179, 188; In re Washington (1976), 65 Ill.2d 391, 399; In re Petition of Owen (1973), 54 Ill.2d 104, 109.
For the reasons stated, we hold that section 5-2-6 of the Unified Code of Corrections does not deprive individuals of equal protection of the laws. Accordingly, the judgment of the circuit court is reversed and, in light of the circuit court's reliance upon its supposed power to specify certain treatment when it sentenced defendant to the custody of the Department, the cause is remanded for resentencing.
Reversed and remanded.
