
119 Ill. App.3d 439 (1983)
456 N.E.2d 621
HOWARD LEE, Petitioner-Appellant,
v.
IVAN PAVKOVIC, M.D., Director of the Illinois Department of Mental Health and Developmental Disabilities, et al., Respondents-Appellees.
No. 82-941.
Illinois Appellate Court  First District (5th Division).
Opinion filed October 28, 1983.
Modified on denial of rehearing December 9, 1983.
*440 Mark J. Heyrman, of Edwin F. Mandel Legal Aid Clinic, of Chicago, for appellant.
Richard M. Daley, State's Attorney, of Chicago (Michael E. Shabat, Marie Quinlivan, and Kip R. Owen, Assistant State's Attorneys, of counsel), for appellees.
Order affirmed and cause remanded.
JUSTICE MEJDA delivered the opinion of the court:
Petitioner, Howard Lee, appeals from the judgment of the circuit court which denied his petition for a writ of habeas corpus by which he had sought his release from the custody of the Illinois Department of Mental Health and Developmental Disabilities (hereinafter the Department). The Department has maintained custody of petitioner since 1977, pursuant to a court order which committed him following a finding that he was not guilty of murder by reason of insanity. Petitioner raises three issues for review. First, he contends that the trial court erred in retroactively applying the amended post-acquittal confinement statute to him in violation of the ex post facto clauses of both the Illinois *441 and United States Constitutions. Second, he asserts that in the absence of a hearing, his confinement violates due process principles. Third, he argues that, in the absence of a hearing, his commitment violates his right to equal protection. For the reasons which follow, we affirm and remand with directions.
As a prelude to our discussion of the facts of this case, we observe that the legislature has at various times amended the statutes pertaining to our disposition of this appeal. Because the timing and applicability of these statutes forms the crux of each of the issues before us, we will note these statutory developments in our factual discussion.
On January 20, 1977, petitioner was found not guilty of murder by reason of insanity after a bench trial. On February 3, 1977, the trial court found that petitioner had not recovered from his insanity and committed him to the custody of the Department of Mental Health pursuant to section 5-2-4(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b)). This statute authorized confinement for an "initial period not to exceed 12 months." (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b).) The order of confinement "shall be in the form of and shall produce the same effects and subsequent review proceedings as an order of hospitalization under the Mental Health Code of 1967 [Ill. Rev. Stat. 1975, ch. 91 1/2, pars. 6-6, 9-6] * * *. The admission, detention, care, treatment, and discharge of the defendant after such order shall be under the Mental Health Code." Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b).
Article X of the Mental Health Code provided two methods by which a person could obtain release from the custody of the Department of Mental Health. First, he could petition for discharge. (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-1.) The standard for release under this section was "that the patient is no longer in need of hospitalization for mental treatment * * *." (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-1.) The Mental Health Code defined a person in need of mental treatment as one who, as a result of a mental disorder, "* * * is reasonably expected at the time the determination is being made or within a reasonable time thereafter to intentionally or unintentionally physically injure himself or other persons, or is unable to care for himself so as to guard himself from physical injury or to provide for his own physical needs." (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 1-11.) The second method by which a committed person could obtain release was for the superintendent of the hospital in which the person was hospitalized to grant an absolute or a conditional discharge. (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-4.) The standard for release under this section was that the patient should be released if he "* * * is no longer in need of hospitalization under such *442 rules and regulations as may be adopted by the Department." (Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-4.) Although the statute required that notice of an absolute discharge be provided to the court which had entered the original order of hospitalization, the Mental Health Code did not provide for judicial review of the decision to discharge a patient. Ill. Rev. Stat. 1975, ch. 91 1/2, par. 10-4.
On August 1, 1977, Public Act 80-164 became effective, amending section 5-2-4 of the Unified Code of Corrections. This act effected two major modifications of the existing statute. First, it replaced the former 12-month initial confinement period with an indefinite period of commitment, limited to the maximum length of time which the defendant could have served had he been convicted of and received the maximum sentence for the most serious crime for which he was acquitted by reason of insanity. (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-4(b).) The second change in the statute was the requirement that notice of a proposed discharge be provided to both the circuit court and the State's Attorney, either of whom could object. (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-4(d)(2).) In such a case, the superintendent could not discharge a patient until after a hearing (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-4(d)(2)), and the decision to discharge was then no longer that of the superintendent but that of the court (Ill. Rev. Stat. 1977, ch. 38, pars. 1005-2-4(g), (h) and (i)).
On February 3, 1978, petitioner's initial commitment period expired.
Effective January 1, 1979, the Mental Health Code of 1967 was repealed and replaced with the Mental Health and Developmental Disabilities Code (the MHDDC) by Public Act 80-1414. (Ill. Rev. Stat. 1979, ch. 91 1/2, par. 6-106.) Under the MHDDC, a person transferred to the custody of the Department of Mental Health by the Department of Corrections under the Unified Code of Corrections may be released "* * * only as provided in the Unified Code of Corrections, as now or hereafter amended." Ill. Rev. Stat. 1979, ch. 91 1/2, par. 3-200.
On September 18, 1980, Public Act 81-1497 became effective. This statute substantially changed the procedure which followed a determination of not guilty by reason of insanity. The Act provides that after such a finding or verdict:
"(a) * * * the defendant shall be ordered to the Department of Mental Health and Developmental Disabilities for an evaluation as to whether he is subject to involuntary admission or in need of mental health services. The order shall specify whether the evaluation shall be conducted on an inpatient or outpatient basis.
The Department shall provide the Court with a report of its *443 evaluation within 30 days of the date of this order. The Court shall hold a hearing as provided under the Mental Health and Developmental Disabilities Code of 1978 to determine if the individual is: (a) subject to involuntary admission; (b) in need of mental health services on an inpatient basis; (c) in need of mental health services on an outpatient basis; (d) a person not in need of mental health services.  The Court shall enter its findings.
If the defendant is found to be subject to involuntary admission or in need of mental health services on an inpatient care basis, the court shall order the defendant to a facility of the Department of Mental Health and Developmental Disabilities.
* * *."
(Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(a).)
The Act also adopted this classification system in discharge proceedings. (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(h).) Public Act 81-1497 also provided that "[t]his amendatory Act shall apply to all persons who have been found not guilty by reason of insanity and who are presently committed to the Department of Mental Health and Developmental Disabilities." Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(1).
On January 11, 1982, petitioner filed his petition for a writ of habeas corpus. After a hearing on March 8, 1982, the trial court denied the petition in a docket entry, the only order of record. Petitioner's brief, however, contains a copy of an additional order dated April 14, 1982. This written order, relying on the case of People v. Thiem (1980), 82 Ill. App.3d 956, 403 N.E.2d 647, calculated the maximum time which petitioner could have served had he been convicted of and received the maximum sentence for the most serious offense charged. The court concluded that petitioner's commitment would expire "no later than December 16, 1983." Petitioner's notice of appeal, filed on April 6, 1982, recites that an appeal is taken from the order and findings of the circuit court entered on March 8, 1982, and from the judgment entered pursuant thereto.

OPINION
 1 Petitioner contends that the trial court erred in retroactively applying the amended post-acquittal confinement provisions of the Unified Code of Corrections to him by calculating a new period of criminal confinement. The trial court's order of April 14, 1982, however, does not appear in the record. The reproduction of that order in petitioner's brief bears a circuit court docket number different from that designating the proceedings now before us. The notice of appeal was filed on *444 April 6, 1982, and states that an appeal is taken from the order and findings entered March 8, 1982, and from the judgment entered thereon. Since the notice of appeal was filed before the order which petitioner would have us review, that order is not part of the judgment appealed from, but instead was entered in another case. Supreme Court Rule 301 provides that an "appeal is a continuation of the proceeding." (87 Ill.2d R. 301.) Inasmuch as the appeal is a continuation of the circuit court proceeding, the notice of appeal cannot vest jurisdiction in this court over an order entered in a different proceeding. This is a deficiency of substance and not merely one of form. (See Clifton-Strode, No. 2, Inc. v. Kent (1982), 110 Ill. App.3d 525, 528, 442 N.E.2d 666.) Accordingly, we cannot consider petitioner's attack on the order of April 14, 1982.
Nonetheless, we must consider petitioner's other assertions of error in the context of the denial of his habeas corpus petition. Before considering these constitutional issues, however, we must first determine whether petitioner is legally in custody under our statutes; that is, we must determine whether the trial court correctly denied the petition for a writ of habeas corpus. Petitioner alleged that he was being held without legal authority by the Department in that his period of lawful confinement had expired. If proved, this allegation is a basis for the issuance of a writ of habeas corpus. Raimondo v. Pavkovic (1982), 107 Ill. App.3d 226, 229, 437 N.E.2d 712; Ill. Rev. Stat. 1981, ch. 110, par. 10-124(2).
On February 3, 1977, the trial court committed petitioner to the custody of the Department of Mental Health, pursuant to section 5-2-4(b) of the Unified Code of Corrections which, at the time, authorized confinement for an "initial period not to exceed 12 months." (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b).) Petitioner was thus lawfully committed to the custody of the Department of Mental Health as of February 3, 1977.
 2 Public Act 80-164 became effective on August 1, 1977, and did not contain an express provision for retroactive application. (See Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-4; compare Ill. Rev. Stat., 1980 Supp., ch. 38, par. 1005-2-4(b).) This statute is not invoked by the commission of the underlying offense but by the ensuing acquittal by reason of insanity. (People v. Valdez (1980), 79 Ill.2d 74, 81, 402 N.E.2d 187.) The order committing petitioner had already been entered when the Act became effective. Since the Unified Code of Corrections provided that all proceedings after the original commitment order "* * * shall be under the Mental Health Code" (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-4(b)), the subsequent amendment to the Unified Code of *445 Corrections could have no effect on petitioner. This act has recently been held to be applicable only prospectively. (Raimondo v. Pavkovic (1982), 107 Ill. App.3d 226, 232, 437 N.E.2d 712.) This holding provides additional support for not applying the Act to petitioner. People v. Thiem (1980), 82 Ill. App.3d 956, 403 N.E.2d 647, is distinguishable from the instant case in that the commitment order in Thiem was entered after the effective date of Public Act 80-164 and the Act therefore was applicable in that case. We therefore conclude that Public Act 80-164 is not relevant to our disposition of this appeal and that the Act did not affect the Department's custody of petitioner.
Since an order of confinement entered under the Unified Code of Corrections produced the same effects as an order of hospitalization under the Mental Health Code of 1967 (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b)), petitioner was lawfully within the custody of the Department of Mental Health under a civil commitment when his initial period of commitment expired. The provisions of the Unified Code of Corrections, as indicated above, were no longer relevant to petitioner's commitment and his potential discharge was governed exclusively by article X of the Mental Health Code of 1967. (Ill. Rev. Stat. 1977, ch. 91 1/2, pars. 10-1, 10-4; Raimondo v. Pavkovic (1982), 107 Ill. App.3d 226, 232, 437 N.E.2d 712.) However, petitioner did not file a petition for discharge and the Department of Mental Health did not initiate discharge proceedings. Petitioner did not, therefore, qualify for either of the two routes to discharge and was accordingly within the Department's lawful custody at this time.
 3 On January 1, 1979, the Mental Health Code of 1967 was repealed and replaced with the MHDDC. Although petitioner's initial period of "criminal" confinement had expired by this time, the Act applied to him because the original commitment order was treated as an order of admission under the Mental Health Code of 1967 (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b)), and petitioner was therefore subject to that code's provisions. Because petitioner had not sought or otherwise been granted a discharge under the relevant provisions of the Mental Health Code of 1977 (sections 10-1 and 10-4), he was lawfully in the custody of the Department of Mental Health when the MHDDC took effect. Raimondo v. Pavkovic (1982), 107 Ill. App.3d 226, 231, 437 N.E.2d 712.
 4 Because petitioner's acquittal by reason of insanity occurred before the effective date of the amendments to the Unified Code of Corrections, the only provisions of that statute now relevant to petitioner are those establishing the procedures governing discharge from a civil commitment which follows a criminal commitment. (Raimondo; *446 Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-4(1).) These provisions were established by Public Act 81-1497 effective on September 18, 1980. Petitioner contends that these provisions may not be applied to him because such application would violate the ex post facto provisions of the Illinois and United States Constitutions. "[A]n amendatory act may be retroactively applied where the legislature so intended and where the statute affects the remedy or matters of procedure." (Maiter v. Chicago Board of Education (1980), 82 Ill.2d 373, 390, 415 N.E.2d 1034.) Section 5-2-4(1) of the amendatory act indicates the legislative intent to apply the act retroactively: "This amendatory Act shall apply to all persons who have been found not guilty by reason of insanity and who are presently committed to the Department * * *." (Ill. Rev. Stat. 1981, ch. 38, par. 1005-2-4(1).) The changes effected by the Act are merely procedural in that they alter the method by which discharge may be procured but do not eliminate the existence of the remedy. "Changes in procedure or existing remedies will not be applied retrospectively, however, where a vested, constitutionally protected right will be deprived by such application." (Maiter v. Chicago Board of Education (1980), 82 Ill.2d 373, 390-91, 415 N.E.2d 1034.) Petitioner points to several "rights" which he contends are abridged by application of the amended statute. These "rights," however, all pertain to procedural considerations. As Maiter points out, "[t]here exists no vested right in any particular mode of procedure." (82 Ill.2d 373, 391, 415 N.E.2d 1034.) Accordingly, we conclude that the amendment affecting discharge procedures may be applied to petitioner.
Neither petitioner nor the Department has initiated discharge proceedings under the Unified Code of Corrections. We must therefore hold that petitioner is lawfully in the custody of the Department at this time and that the trial court correctly denied the petition for a writ of habeas corpus. See Ill. Rev. Stat. 1981, ch. 110, par. 10-124(2).
 5 Petitioner asserts that his confinement without a hearing violates due process and equal protection principles. We have already noted, however, that the original order of commitment served as an order of commitment under the Mental Health Code of 1967. (Ill. Rev. Stat. 1975, ch. 38, par. 1005-2-4(b).) Petitioner did in fact receive a hearing, which resulted in the original order of commitment and a finding that petitioner had not recovered from his insanity at that time. The United States Supreme Court has recently determined that "a finding of not guilty by reason of insanity is a sufficient foundation for commitment of an insanity acquittee for the purposes of treatment and the protection of society." (Jones v. United States (1983), 463 U.S. 354, 366, 77 L.Ed.2d 694, 706, 103 S.Ct. 3043, 3050.) The court in *447 Jones also held that "an acquittee's hypothetical maximum sentence [does not provide] the constitutional limit for his commitment." (463 U.S. 354, 368, 77 L.Ed. 694, 708, 103 S.Ct. 3043, 3052.) Accordingly, we hold that the absence of a second hearing on the expiration of petitioner's initial "criminal" period of commitment does not offend due process.
 6 Petitioner next asserts that his commitment without a post-expiration hearing violates equal protection principles because persons acquitted of crimes by reason of insanity now are entitled to such a hearing. "`A statute classifying persons or objects is not unconstitutional because it affects one class and not another, provided that it affects all members of the same class alike and provided that the classification is not arbitrary, but based on some substantial difference in circumstances properly related to the classification.'" (People v. Valdez (1980), 79 Ill.2d 74, 83, 402 N.E.2d 187, quoting Fujimura v. Chicago Transit Authority (1977), 67 Ill.2d 506, 512, 368 N.E.2d 105.) Merely because the legislature sees fit to change the law does not give rise to an equal protection attack on those who, at some previous time, did not have the benefit of the new statute. People v. Grant (1978), 71 Ill.2d 551, 561, 377 N.E.2d 4 (equal protection not violated by failure to allow sentencing election under new statute).
We hold, therefore, that petitioner has not demonstrated any constitutional or statutory impediments to his continued confinement with the Department. As petitioner points out, however, he has not received a hearing on his status since his commitment began. Considerations of fairness and substantial justice indicate that we remand this cause to the circuit court with directions to consider the petition for a writ of habeas corpus as a petition for discharge under the Unified Code of Corrections. See People v. Rink (1983), 97 Ill.2d 533, 543-44.
For the reasons stated, the order denying the petition for writ of habeas corpus is affirmed and the cause remanded with directions above set forth.
Affirmed and remanded with directions.
WILSON, P.J., and SULLIVAN, J., concur.
