delivered the opinion of the court:
For 14 years the State has been concerned with what to do with Donald Lang, an illiterate deaf mute who has virtually no ability to communicate with other people in any recognized language system. Notwithstanding this severe handicap, Lang has twice been charged with murder, and the State insists that he poses an extreme danger to society. He is admittedly unfit to stand trial and has been held to be not in need of mental treatment and not civilly *317committable to a mental institution. His legal history for the past 14 years illustrates the nature and complexity of the problem.
In 1965 the State charged Lang with the murder of a woman. He was found unfit to stand trial. His lawyer, who had extensive experience in defending deaf persons, realized that Lang faced indefinite civil commitment and requested that he be tried for murder. The lawyer agreed to waive Lang’s constitutional right not to be tried. The request was denied, and Lang was civilly committed to the Department of Mental Health. (People v. Lang (1967), 37 Ill. 2d 75.) Two years after the commitment the superintendent of the institution in which Lang was confined wrote a letter to the counsel for the Department stating that Lang was unlikely ever to become fit for trial. Sign language training had been completely ineffective. The superintendent recommended that Lang’s lawyer be contacted and that Lang be criminally tried. Lang’s lawyer then filed a petition for a writ of habeas corpus, contending that Lang was being imprisoned for life even though he had never been tried for or convicted of a crime. This court, in People ex rel. Myers v. Briggs (1970), 46 Ill. 2d 281, 288, held that Lang, facing indefinite commitment, “should be given an opportunity to obtain a trial to determine whether or not he is guilty as charged or should be released.” The court remanded the cause for trial. The State subsequently dismissed charges against Lang because the principal witness had died. Lang was released from confinement in February 1971.
In July 1971, Lang was again arrested and charged with the murder of another woman. This second murder involved circumstances quite similar to those of the other homicide. Once again, Lang’s lawyer requested that he be tried. The trial court, following the Myers rationale, proceeded with a trial, taking special precautions in an attempt to compensate for Lang’s inability to communi*318cate. A jury convicted Lang, and he was sentenced to 14 to 25 years’ imprisonment. The appellate court subsequently reversed Lang’s conviction, stating that though the evidence clearly established guilt, no trial procedures could effectively compensate for the handicap of a deaf mute with whom there could be no communication. The appellate court remanded the cause for a fitness hearing. People v. Lang (1975), 26 Ill. App. 3d 648.
At a March 1976 fitness hearing, the trial court ruled Lang unfit and remanded him to the Department of Mental Health and Developmental Disabilities (Department), pursuant to provisions in the Unified Code of Corrections (Ill. Rev. Stat. 1975, ch. 38, pars. 1005 — 2—1, 1005 — 2—2), which provide in part:
“Sec. 5 — 2—1. Fitness for Trial or Sentencing.
(a) For the purposes of this Section a defendant is unfit to stand trial or be sentenced if, because of a mental or physical condition, he is unable:
(1) to understand the nature and purpose of the proceedings against him; or
(2) to assist in his defense.
* * *
Sec. 5 — 2—2. Defendant Found Unfit — Commitment and Release.
(a) If the defendant is found unfit to stand trial or be sentenced, the court shall remand the defendant to a hospital, as defined by the Mental Health Code of 1967, and shall order that a hearing be conducted in accordance with the procedures, and within the time periods, specified in such Act. The disposition of defendant pursuant to such hearing, and the admission, detention, care, treatment and discharge of any such defendant found to be in need of mental treatment, shall be determined in accordance with such Act. If the defendant is not ordered hospitalized in such hearing, the Department of Mental Health and Developmental Disabilities shall petition the trial court to release the defendant on bail or recognizance, under such conditions as the court finds appropriate, which may include, but need not be limited to requiring the defendant to submit to or to *319secure treatment for his mental condition.
(b) A defendant hospitalized under this Section shall be returned to the court not more than 90 days after the court’s original finding of unfitness, and each 12 months thereafter. At such re-examination the court may proceed, find, and order as in the first instance under paragraph (a) of this Section. If the court finds that defendant continues to be unfit to stand trial or be sentenced but that he no longer requires hospitalization, the defendant shall be released under paragraph (a) of this Section on bail or recognizance. Either the State or the defendant may at any time petition the court for review of the defendant’s fitness.
(c) A person found unfit under the provisions of this Article who is thereafter sentenced for the offense charged at the time of such finding, shall be credited with time during which he was confined in a public or private hospital after such a finding of unfitness. If a defendant has been confined in a public or private hospital after a finding of unfitness under Section 5 — 2—6 for a period equal to the maximum sentence of imprisonment that could be imposed under Article 8 for the offense or offenses charged, the court shall order the charge or charges dismissed on motion of the defendant, his guardian, or the Director of the Department of Mental Health and Developmental Disabilities.”
Following that fitness hearing, Lang was placed in the Illinois State Psychiatric Institute, a Department facility, where he again received sign language instruction. Sometime later the Department concluded that Lang was not a “person in need of mental treatment” as that term was defined in section 1 — 11 of the 1967 Mental Health Code (Ill. Rev. Stat. 1975, ch. 9H/2, par. 1 — 11). This section stated:
“Sec. 1 — 11. ‘Person In Need of Mental Treatment’, when used in this Act, means any person afflicted with a mental disorder, not including a person who is mentally retarded, as defined in this Act, if that person, as a result of such mental disorder, is reasonably expected at the time the determination is being made or within a *320reasonable 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. This term does not include a person whose mental processes have merely been weakened or impaired by reason of advanced years.”
A hearing was held and the trial judge ruled in December of 1976 that Lang did not need “mental treatment.” Lang was unfit, the court ruled, because of a “combined physical and mental condition.” Lang did not have a “clearly diagnosed mental disorder” and was not mentally retarded. Because of these facts, Lang could not be civilly committed under the Code. Instead, the court ordered Lang released on bail (as provided in section 5 — 2—2(a) of the Unified Code of Corrections (Ill. Rev. Stat. 1975, ch. 38, par. 1005 — 2—2(a))), providing that he must continue in a training program and reside in a secure setting. The court also directed the Department to collaborate with Lang’s attorneys in developing an appropriate program. Shortly thereafter the Department petitioned for the release of Lang from the Psychiatric Institute, and in March 1977 the court vacated an order requiring the Department to hold Lang. Lang’s conservator then filed an application with the Department for Lang’s voluntary or informal admission. Lang remained at the Psychiatric Institute receiving therapy until October 1977, at which time the Department received permission to discharge him to Cook County jail. Lang has been incarcerated in the jail since that time and receives no therapy.
Although the trial court allowed the Department to discharge Lang in October 1977, the judge concurrently ordered that a writ of mandamus issue directing the Department to create and implement an adequate and humane care and treatment program. The trial court had been unable to find an alternative non-Department program for Lang. On appeal, the appellate court reversed the *321 mandamus order but also affirmed an order denying a separate petition for habeas corpus filed on Lang’s behalf by the public defender. (62 Ill. App. 3d 688.) This case is a consolidation of two appeals from that appellate decision.
Four sets of lawyers advance different solutions to the problem of Donald Lang on this appeal. Lang’s conservator, unable to find a training program that will accept Lang because of the pending murder charge, and unable to persuade the Department to treat Lang, cannot obtain his ward’s release on bail. The conservator thus desires a writ of mandamus compelling action by the Department. The Department, claiming that it has no statutory authority to treat people who are not in need of mental treatment refuses to accept or aid Lang, who, according to it and the trial court, is not afflicted with a mental disorder. The public defender, in turn, argues that charges against Lang must be dropped because Lang cannot be tried, cannot be civilly committed, and cannot comply with impossible conditions of bail. Finally, the Cook County State’s Attorney insists that Lang’s constitutional rights have not been violated, given the fact that reasonable bail has been set. The defendant himself, the State contends, has the obligation to obtain treatment. In addition, the State’s Attorney urges that Lang presents a serious danger to society.
Another complication in this case involves an apparent change in the prognosis for Lang’s condition. Until recently, all of the experts considered Lang permanently unfit because of a combination of physical defects, personality defects, and mental retardation. Repeated attempts in the past to train Lang failed. Following the March 1976 placement in the Psychiatric Institute, however, Lang made noticeable progress in learning sign language. This progress occurred primarily under the instruction of one specialist, a woman toward whom Lang developed a close personal attachment. At the bail *322hearings, this specialist, and several experts on the testing of deaf persons, testified that Lang’s intelligence was normal to bright-normal, and that Lang might be fit to stand trial in 3 to 5 years.
The United States Supreme Court and this court have repeatedly held that trial of an unfit defendant violates due process. Drope v. Missouri (1975), 420 U.S. 162, 43 L. Ed. 2d 103, 95 S. Ct. 896; Pate v. Robinson (1966), 383 U.S. 375, 15 L. Ed. 2d 815, 86 S. Ct. 836; People v. McCullum (1977), 66 Ill. 2d 306; People v. Barkan (1970), 45 Ill. 2d 261. See generally, American Bar Foundation, The Mentally Disabled and the Law 408-23 (S. Brakel and R. Rock ed. 1971); Note, Illinois Fitness For Trial: Processes, Paradoxes, Proposals, 6 Loy. Chi. L.J. 678 (1975).
After the Supreme Court decided Dusky v. United States (1960), 362 U.S. 402, 4 L. Ed. 2d 824, 80 S. Ct. 788, in which it stated its definition of fitness, various formulations of the fitness test have been suggested. The Illinois statutory definition provides a typical example. A defendant is unfit to stand trial if, “because of a mental or physical condition, he is unable: (1) to understand the nature and purpose of the proceedings against him; or (2) to assist in his defense.” (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—1.) (See generally, Pizzi, Competency to Stand Trial in Federal Courts: Conceptual and Constitutional Problems, 45 U. Chi. L. Rev. 21 (1977); Note, The Identification of Incompetent Defendants: Separating Those Unfit for Adversary Combat From Those Who Are Fit, 66 Ky. L.J. 666 (1978).) No one questions Lang’s unfitness.
Though the fitness concept has provided substantial due process protection for unfit criminal defendants, it has also generated several side effects. Under traditional procedures, a determination of unfitness resulted in virtually automatic commitment to a mental institution *323until fitness was attained. If the defendant never became fit, he could thus remain confined permanently. Because of this fact, the unfitness-commitment procedure often produced extremely long periods of confinement for criminal defendants who, had they been fit, might have plea bargained to a relatively light sentence, obtained an outright or insanity acquittal, or received a prison sentence subject both to maximum limits and parole. In short, unfitness determinations often produced confinement disproportionately long in light of the underlying criminal conduct. These unfit defendants obtained none of the procedural protections provided involuntary admittees and often remained in institutions far longer than did civilly committed patients. See generally, Laboratory of Community Psychiatry, Harvard Medical School, Competency to Stand Trial and Mental Illness (1974); A. Brooks, Law, Psychiatry and the Mental Health System 332 (1974); Burt & Morris, A Proposal for the Abolition of the Incompetency Plea, 40 U. Chi. L. Rev. 66 (1972); American Bar Association Commission on the Mentally Disabled, Legal Issues in State Mental Health Care: Proposals for Change, Incompetence to Stand Trial on Criminal Charges, 2 Mental Disability L. Rep. 617 (1977).
The decision of the United States Supreme Court in Jackson v. Indiana (1972), 406 U.S. 715, 32 L. Ed. 2d 435, 92 S. Ct. 1845, drastically altered the practice of committing those persons charged with a crime who were found unfit to stand trial. In that case, the defendant, who was charged with a minor violation, was committed under Indiana law for an indefinite period. The defendant, Jackson, like Lang, was a deaf mute who could not communicate with others. The court, after extensively discussing Indiana’s failure to demonstrate that Jackson presented a danger to himself or others, stated:
“We hold, consequently, that a person charged by a State with a criminal offense who is *324committed solely on account of his incapacity to proceed to trial cannot be held more than the reasonable period of time necessary to determine whether there is a substantial probability that he will attain that capacity in the foreseeable future. If it is determined that this is not the case, then the State must either institute the customary civil commitment proceeding that would be required to commit indefinitely any other citizen, or release the defendant. Furthermore, even if it is determined that the defendant probably soon will be able to stand trial, his continued commitment must be justified by progress toward that goal.” (Jackson v. Indiana (1972), 406 U.S. 715, 738, 32 L. Ed. 2d 435, 451, 92 S. Ct. 1845, 1858.)
The commit-or-release language of this quotation has been made the focal point of the problem in our case. This problem is accentuated by the accepted belief in Illinois that the unfitness standards are different from the standards for involuntary commitment.
Too often, in considering whether a person is subject to involuntary commitment, attention has focused on the nature of the disability as specified in the statute; that is, Is the individual in need of mental treatment or mentally retarded? (Ill. Rev. Stat. 1975, ch. 91M>, par. 2 — 1.) The term “person in need of mental treatment” was defined in the statute as a person afflicted with a mental disorder. (Ill. Rev. Stat. 1975, ch. 91V2, par. 1 — 11.) It is this requirement that has so often caused the difficulty. Although a person may be unfit to stand trial because he cannot understand the nature and purpose of the proceedings against him or assist in his defense (Ill. Rev. Stat. 1975, ch. 38, par. 1005 — 2—1), he cannot be committed as a person in need of mental treatment if he is found not to be afflicted with a mental disorder.
By focusing on the absence of a mental disorder, *325adequate consideration has not been given to the more important condition necessary for involuntary commitment, which is also of prime significance in determining what disposition should be made of one who is unfit to stand trial. The Mental Health Code of 1967 provided that, to be committable, not only must the person in need of mental treatment be afflipted with a mental disorder but also as a result of that mental disorder the person must be reasonably expected to be a danger to himself or others. Ill. Rev. Stat. 1975, ch. 911/2, par. 1 — 11.
The existence of the mental disability itself is no longer sufficient justification for involuntarily committing a person to a mental institution for an indefinite period of time. The United States Supreme Court in O’Connor v. Donaldson (1975), 422 U.S. 563, 575, 45 L. Ed. 2d 396, 406-07, 95 S. Ct. 2486, 2493, stated:
“A finding of ‘mental illness’ alone cannot justify a State’s locking a person up against his will and keeping him indefinitely in simple custodial confinement. Assuming that that term can be given a reasonably precise content and that the ‘mentally ill’ can be identified with reasonable accuracy, there is still no constitutional basis for confining such persons involuntarily if they are dangerous to no one and can live safely in freedom.”
The Governor’s Commission for Revision of the Mental Health Code of Illinois, in its 1976 report, recommended changes both in the definition of those who are involuntarily committable and in the procedures for determining fitness to stand trial. Thereafter, the General Assembly repealed the Mental Health Code of 1967, consisting of sections 1 — 1 to 20 — 1 (Ill. Rev. Stat. 1977, ch. 911/2, pars. 1 — 1 to 20 — 1), and replaced it with the Mental Health and Developmental Disabilities (MHDD) Code consisting of sections 1 — 100 to 6 — 107, by the *326enactment of Public Act 80 — 1414, effective January 1, 1979. The recommendations of the Governor’s Commission with regard to involuntary commitment have been incorporated in sections 1 — 119 and 3 — 700 et seq. of the MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 91Í4, pars. 1 — 119, 3 — 700 et seq.). Section 3 — 700 of the Code provides that a person who may be involuntarily committed is “[a] person 18 years of age or older who is subject to involuntary admission.” (Ill. Rev. Stat., 1978 Supp., ch. 9114, par. 3 — 700.) Thus the “person in need of mental treatment” designation of the Mental Health Code of 1967 has been removed. A “person subject to involuntary admission” is defined in section 1 — 119 as a “person who is mentally ill and who because of his illness is reasonably expected to inflict serious physical harm upon himself or another in the near future.” (Ill. Rev. Stat., 1978 Supp., ch. 9114, par. 1 — 119.) The necessary requirement of dangerousness has been retained in the definition of one who is committable, but under this definition no longer need he be afflicted with a mental disorder. Although the person must be “mentally ill” the new code does not define that term. The Governor’s Commission, by way of explanation of this recommended change, stated concerning the use of the term “mentally ill”:
“That term is left undefined as in prior codes, largely because any definition which could be made legally explicit would necessarily be so broad or circular as to preclude accurate application. By not providing an explicit statutory definition, a common law definition fashioned by the courts on a case-by-case basis is deemed to be preferable as it has been in the past.” Report, Governor’s Commission for Revision of the Mental Health Code of Illinois, 1976, at 14.
We see no need to perpetuate under the revision of the Code the hiatus which has heretofore existed because of the different standards used to determine fitness to stand trial and involuntary commitment. The “mental disorder” *327requirement has been removed as a prerequisite of involuntary commitment. Hereafter, if a person is found unfit to stand trial, he should be considered to be mentally ill under the MHDD Code unless his unfitness is due to a solely physical condition. If that person also meets the dangerousness requirement of the Code, he should be considered to be a “person subject to involuntary admission.” (Ill. Rev. Stat., 1978 Supp., ch. 9U/2, par. 1 — 119.) However, as this court noted in People v. Murphy (1978), 72 Ill. 2d 421, 432-33, fitness speaks only within the context of trial. A person may be fit to stand trial, although upon other subjects his mind may be unsound or deranged. (People v. Burson (1957), 11 Ill. 2d 360, 369; Withers v. People (1961), 23 Ill. 2d 131.) Thus, our holding in this case does not suggest that one who may be classified as mentally ill will necessarily be unfit to stand trial.
The Governor’s Commission for Revision of the Mental Health Code, in its report, also recommended changes in the Unified Code of Corrections concerning the determination of fitness to stand trial and procedures for subsequently handling those found to be unfit. The General Assembly did not enact legislation implementing these recommendations, although at the present time a bill designed to incorporate at least some of these recommendations is pending in the General Assembly (Senate Bill 0133, 1979 Session of the 81st General Assembly). Thus, at the present time, the law covering the procedures to be followed in determining the disposition of the defendant in this case incorporates only part of the recommendations of the Governor’s Commission while leaving intact the provisions under sections 5 — 2—1 and 5 — 2—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, pars. 1005 — 2—1, 1005 — 2—2). Until the suggested changes are made, we find it necessary to determine the issues in this case under the law as it now *328exists. We find that the provisions of the MHDD Code effective January 1, 1979 (Ill. Rev. Stat., 1978 Supp., ch. 911/s>, par. 1 — 100 et seq.), in conjunction with the provisions of section 5 — 2—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2), provide a means of resolving the questions in our case that have heretofore confounded court and counsel.
Because of the commit-or-release language of the United States Supreme Court in Jackson v. Indiana, the public defender contends that Lang should be released, because it has not been determined that he will be able to stand trial in the foreseeable future. We do not agree. The interpretation which we have placed on the new MHDD Code, applied in conjunction with section 5 — 2—2 of the Unified Code of Corrections, complies with the dictates of Jackson v. Indiana. Under this construction Lang, if found to be dangerous, would not be held indefinitely as a person unfit to stand trial. His unfitness casts him into the class defined as mentally ill by the MHDD Code, and if he also meets the dangerousness test, he would be committed in the same manner as one who is involuntarily civilly committed. (Ill. Rev. Stat., 1978 Supp., ch. 9V/2, pars. 1 — 119, 3 — 700 et seq.) Pursuant to section 5 — 2—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2), he would be subject to detention, care, treatment and discharge under the provisions of the MHDD Code. This commitment would conform to the commit-or-release language of Jackson v. Indiana.
By following the relevant provisions of the two codes, Lang’s rights will be fully protected. Section 5 — 2—2(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2(b)) provides for a periodic review of the finding of unfitness every 12 months and also that either the State or the defendant may, at any time, petition the court for a review of the unfitness status. Section 3-900 of the MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 9D/2, par. 3 — 900) authorizes the filing of a *329petition for discharge by anyone who has been involuntarily committed, and section 3 — 901(b) of the MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 9114, par. 3-901(b)) provides that if the court finds at a hearing conducted on such a petition that the person is not subject to involuntary admission then it shall enter an order discharging the patient. If a person who has been found unfit to stand trial is later determined, under a hearing as provided in section 3 — 901, to no longer be dangerous and therefore not subject to involuntary admission, the Department, under section 5 — 2—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2), would then petition the court to admit the defendant to bail. People ex rel. Martin v. Strayhorn (1976), 62 Ill. 2d 296.
In Jackson v. Indiana the court noted that the defendant’s commitment under Indiana law was not justified by any requirement of a finding of dangerousness. The court in that case discussed extensively Greenwood v. United States (1956), 350 U.S. 366, 100 L. Ed. 412, 76 S. Ct. 410, which construed a Federal statute authorizing the commitment of one found incompetent to stand trial as requiring release of an individual after a reasonable period of time unless there is a finding of dangerousness. By applying the construction we have placed on the provisions of the new MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 9114, par. 1 — 100 et seq.) to the present provisions of sections 5 — 2—1 and 5 — 2—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, pars. 1005 — 2—1, 1005 — 2—2), the possibility of indefinitely committing an individual to a mental facility solely because he has been found unfit to stand trial is avoided.
Concern has been voiced over the holding of an individual under a criminal charge after a finding of unfitness without giving the opportunity to the defendant to have a determination of whether he, in fact, committed the offense. In People ex rel. Myers v. Briggs (1970), 46 Ill. 2d 281, this court held that the defendant should be given *330a trial to determine whether he was guilty or whether he should be discharged. Such trials are often referred to as “innocent only” hearings. The Report of the Governor’s Commission on Revision of the Mental Health Code of Illinois, 1976, at pages 184 and 185, suggested an amendment to the Unified Code of Corrections which would provide for a “discharge hearing.” In Jackson v. Indiana the United States Supreme Court commented approvingly on such hearings and noted that some States have statutory provisions allowing an unfit defendant a trial at which to establish his innocence. In our case, Lang has been tried for the murder charge and found guilty by a jury. Although the appellate court reversed the conviction as a violation of due process of law because of Lang’s apparent unfitness, nonetheless, the trial afforded an opportunity to determine from the evidence whether or not he should be released as an innocent person. (People ex rel. Myers v. Briggs.) Thus the due process issue inherent in holding pending charges indefinitely over one who will not have a chance to prove his innocence is not present in this case.
We must consider the results of an “innocent only” hearing with our above construction of the MHDD Code and section 5 — 2—2 of the Unified Code of Corrections. If, as a result of that hearing, defendant is found innocent, then his unfitness to stand trial should not subject him to involuntary commitment under the MHDD Code because the criminal charge against him could not be used to establish his dangerousness as the basis for an involuntary commitment. However, the fact that he has been found innocent of the particular charge would not prevent his civil commitment under the provisions of the MHDD Code.
In this case the trial court, following a hearing under the Mental Health Code of 1967 to. determine whether Lang was committable, determined that Lang was not committable. The judge extensively analyzed the evidence and the law and concluded that Lang was not a person in *331need of mental treatment as defined in the Code because he was not afflicted with a mental disorder. The court did find, however, that there was substantial evidence concerning the dangerous traits which Lang possessed and concluded that he had “clearly manifested dangerous behavior.” The trial court cited testimony of various experts which supported this conclusion. This testimony, coupled with the fact that Lang’s trial had established that he had committed the homicide, which the evidence indicated was quite brutal, is sufficient to support an involuntary commitment under the provisions of the MHDD Code, which became effective January 1, 1979..
Under section 5 — 2—2(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2(b)), a defendant who has been hospitalized shall be returned to the court every 12 months for a reexamination of the determination of his unfitness to stand trial and, if he is found unfit, to determine whether he still requires hospitalization. Since it has been more than a year since Lang was found unfit to stand trial, and more than a year since a hearing was held concerning his involuntary commitment and admission to bail, we remand this cause to the circuit court of Cook County for a hearing as provided in section 5 — 2—2(b) of the Unified Code of Corrections to determine whether he is still unfit to stand trial and, if so, whether he still has the dangerous characteristics required for involuntary admission under sections 1 — 119 and 3 — 700 et seq. of the MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 9H4, pars. 1 — 119, 3 — 700 et seq.). If Lang is found to be unfit to stand trial for other than a physical condition, and to be a person subject to involuntary admission, then the circuit court of Cook County is directed to enter an order finding him subject to involuntary admission and to make the appropriate dispositional orders under article VIII of the MHDD Code (Ill. Rev. Stat., 1978 Supp., ch. 9D/2, par. 3 — 800 et seq.). If Lang is found unfit to stand trial but *332not dangerous and thus not subject to involuntary commitment, the court may release him on bail. However in doing so it should specify conditions of bail under section 5 — 2—2(a) of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005 — 2—2(a)) which prescribe appropriate treatment by the Department of Mental .Health and Developmental Disabilities in an attempt to establish Lang’s fitness to be tried. As noted above we are aware that at the present time the General Assembly is considering Senate Bill 0133, which proposes amendments to the Unified Code of Corrections that involve certain procedural changes in the determination of fitness to stand trial and the subsequent handling of those found to be unfit. In making the determinations which we have directed in this opinion the procedural safeguards provided by the applicable statutes are to be followed.
The appellate court is affirmed as to that part of its judgment (1) which vacated the circuit court’s order of October 3, 1977, requiring the Department to file a petition detailing a program for the defendant; (2) as to that part of its judgment which vacated the writ of mandamus entered against the Director of Mental Health and Developmental Disability and which reversed the circuit court’s order denying the Director’s motion to vacate, alter or amend that order, and (3) as to that part of its judgment affirming the circuit court’s denial of a petition for a writ of habeas corpus. The judgment of the appellate court is reversed insofar as that judgment reset special conditions of the defendant’s bail. This cause is remanded to the circuit court of Cook County with directions to conduct further proceedings in accordance with this opinion.
Appellate court affirmed in part and reversed in part; cause remanded, with directions.