delivered the Opinion of the Court.
This appeal is brought by the People .of the State of Colorado from a finding by the trial court that section 16-8-114.5(2), 8A C.R.S. (1993 Supp.), pertaining to the termination of criminal proceedings against an incompetent defendant, is unconstitutional on its face and as applied to the defendant-appellee, Michael Paul Zapotocky. 1 Finding . that the trial court incorrectly construed the statute, we hold that the statute is constitutional. We reverse and remand the case with directions.
I
Zapotocky was charged with second degree murder in El Paso District Court on August 30, 1988. It is alleged that on July 22, 1988, he kicked Rowan Monteith to death in the bathroom of a workshop for the developmentally disabled in Colorado Springs. Zapotocky, who is presently thirty-four years old, is severely developmentally disabled and moderately retarded. His autism and retardation appear to stem from brain trauma suffered at birth. As a consequence, Zapo-tocky suffers from an organic personality disorder which periodically has resulted in explosive and assaultive behavior throughout his life.
On September 30, 1988, the trial court ordered that Zapotocky be examined to determine his competency. Zapotocky then moved to terminate the criminal proceeding pursuant to section 16-8-114.5(2), 8A C.R.S. (1986). At that time, the statute required the court to terminate the criminal proceeding if there was a substantial probability that the defendant would not be restored to competency within the foreseeable future.
If, on the basis of the available evidence,
... there is a substantial probability that the defendant will not be restored to competency within the foreseeable future, the court shall terminate the criminal proceeding and the commitment or treatment order under section 16-8-112(2) and shall either order the release of the defendant or the commencement of civil proceedings under the provisions of article 10 of title 27, C.R.S.
§ 16-8-114.5(2), 8A C.R.S. (1986).
A competency hearing was held pursuant to section 16-8-111, 8A C.R.S. (1986), on December 15, 1988. At that hearing, the trial court found Zapotocky to be incompetent to proceed, but it did not dismiss the criminal case without additional evidence obtained by evaluations. Instead, the trial court reset the case for a hearing regarding termination of the criminal proceeding and ordered that Zapotocky be released on bond to his family.
On February 2,1989, the trial court held a hearing on Zapotocky’s motion to terminate the criminal proceeding. .Although evidence was presented that Zapotocky would not be restored to competency, the trial court did not dismiss the case, concluding that Zapo-tocky must first be committed to the department of institutions pursuant to section 16-8-112(2), 8A C.R.S. (1986). 2 The trial court then committed Zapotocky to the Mental Health Institute at Pueblo.
Zapotocky again moved to terminate the criminal proceeding on April 5, 1989. At a hearing on April 21, 1989, the trial court heard further evidence that Zapotocky would not be restored to competency. However, the trial court again refused to find that there was a substantial probability that Za-potocky would not be restored to competency in the foreseeable future and did not terminate the criminal proceeding. According to the trial court, Zapotocky’s motion was premature because the department of institutions had not exhausted every treatment al *1237 ternative before concluding that Zapotocky’s condition would not improve. 3
On April 27, 1989, the General Assembly amended section 16-8-114.5(2) (the amended statute) to provide that a court could terminate a criminal proceeding against an incompetent defendant only upon motion of the district attorney. Ch. 150, sec. 1, § 16 — 8— 114.5(2), 1989 Colo.Sess.Laws 867, 867. The district attorney refused to move to dismiss the criminal proceeding because he believed that Zapotocky was a threat to public safety and that civil commitment would not adequately protect the public.
A fourth hearing was held on February 19, 1993. At this hearing, the trial court found Zapotocky to be “forever and totally incompetent.” The trial court also applied the amended statute to Zapotocky and declared the statute to be unconstitutional in violation of Zapotocky’s due process rights and the doctrine of separation of powers. The trial court then dismissed the charges against Za-potocky under the pre-1989 statute and ordered the commencement of civil commitment proceedings under sections 27-10-101 to -129, 11B C.R.S. (1989).
II
Due process precludes placing a defendant on trial while he is incompetent.
Drope v. Missouri,
In Colorado, when the trial court has reason to believe that a defendant is incompetent to proceed, it must suspend the proceeding and determine the competency of the defendant. § 16-8-110(2)(a), 8A C.R.S. (1986). If the trial court determines that the defendant is competent to proceed, the criminal proceeding continues. § 16-8-112(1). On the other hand, if the trial court finds that the defendant is incompetent to proceed, the proceeding is not resumed.
4
Instead, section 16-8-112(2) provides that the trial court must commit the defendant to the custody of the department of institutions until he is able to stand trial. However, the defendant cannot remain confined for a period in excess of the maximum term which could be imposed for the offense, less minimum good time. § 16-8-114.5(1). Moreover, the trial judge has a duty to review the defendant’s case at least every six months to consider the probability that the defendant will be restored eventually to competency and the justification for continued commitment. § 16-8-114.5(2);
Parks v. Denver Dist. Court,
If the defendant is charged with an offense which does not involve violent behavior, the trial court may order the defendant to undergo outpatient treatment at an appropriate facility. § 16-8-112(2). The trial court also may release the defendant on bail under the criteria set forth in Colorado statutes and the Rules of Criminal Procedure, section 16 — 8— 112(3), even if the defendant is charged with a violent crime.
People v. White,
The question raised in this case concerns what occurs when it becomes apparent the defendant is unlikely in the foreseeable future to regain competency to stand trial. Prior to April 27, 1989, the trial court was required to terminate the criminal proceeding and any commitment or treatment order rendered by the court pursuant to section 16-8-112(2), once it determined that there *1238 was a substantial probability that the defendant would not be restored to competency. § 16-8-114.5(2), 8A C.R.S. (1986). The court then was required to order either the release of the defendant or the commencement of civil commitment proceedings. Id. Under the amended statute, however, a trial court can terminate the criminal proceedings only upon motion of the district attorney. § 16-8-114.5(2), 8A C.R.S. (1993 Supp.). It is this limitation which caused the trial court to find the statute to be unconstitutional facially and as applied.
Ill
We first address whether the trial court correctly held that the amended statute is an unconstitutional violation of Zapotocky’s due process rights. Although the reasons for its decision are unclear, it appears that the trial court believed that the amended statute is unconstitutional because it allows the state both to maintain criminal proceedings against an incompetent' defendant and to keep the defendant confined, even though it is unlikely that the defendant will ever be tried. We believe that this conclusion is based on an erroneous interpretation of the statute.
A
A court’s primary task in construing a statute is to ascertain and give effect to the intent of the legislature.
People v. Schuett,
Section 16-8-114.5(2), as amended in 1989, provides:
If, on the basis of the available evidence, ... there is a substantial probability that the defendant will not be restored to competency within the foreseeable future, upon motion of the district attorney, the court may terminate the criminal proceeding and the commitment or treatment order under section 16-8-112(2) and may either order the release of the defendant or the commencement of civil proceedings under the provisions of article 10 of title 27, C.R.S.
Ch. 150, sec. 1, § 16-8-114.5(2), 1989 Colo. Sess.Laws 867, 867 (emphasis added).
The constitutionality of this subsection depends on the scope of the district attorney’s ability to control the fate of an incompetent defendant embodied in the phrase “upon motion of the district attorney.” Zapotocky argues, and the trial court apparently concluded, that section 16-8 — 114.-5(2) as amended mandates that the district attorney must file a motion before the trial court can terminate criminal proceedings and before the trial court can order the defendant released or civilly committed. Under this construction of the statute, the trial court is powerless to release or civilly commit the defendant unless the district attorney moves to terminate the proceedings.
However, section 16-8-114.5(2) also can be interpreted to give the district attorney authority only to initiate the dismissal of the criminal charges. Under this interpretation, the amended statute does not require a motion by the district attorney before the trial court can release or civilly commit a defendant. It merely describes what the trial court may do once a motion has been filed by the district attorney and the proceedings are terminated pursuant to that motion. Because the scope of the district attorney’s authority under section 16-8-114.5(2) is un *1239 clear, the statute is ambiguous. We must therefore look beyond the statutory language in order to discover the legislature’s intent.
1
The legislative history of section 16-8-114.5(2) demonstrates that the legislature was primarily concerned with giving the district attorney authority over the decision whether to terminate the criminal proceedings against an incompetent defendant. The amendments to section 16-8-114.5(2) were proposed in House Bill 1197, whose prime sponsor was State Representative Tim Foster. In a hearing before the House Judiciary Committee on January 26, 1989, Representative Foster stated that the prior version of section 16-8-114.5(2) allowed a defendant who had been declared mentally incompetent to avoid facing criminal charges even after being restored to competency.
Essentially, the status of the law as it currently is, if you are deemed not competent to stand trial, you are then sent on to the State Hospital where you can serve no longer than you would serve if you were convicted of the crime. It’s after that that the law gets a little on the tricky side. You are reviewed then every six months to determine whether you have a substantial likelihood of regaining competence. Once a determination is made that you are not likely, or substantially likely, to regain competence in the foreseeable future, ... we mandate that the court shall terminate the criminal proceedings, which obviously then means that the statute of limitations begins to run, ... 5
Audiotape of Hearings before House Judiciary Committee on House Bill 1197, January 26, 1989, 57th General Assembly (emphasis added). The bill would close what Representative Foster referred to as a “loophole” by allowing the criminal charges to remain pending so that the statute of limitations for prosecuting the defendant would not lapse. Id.
Stephen ErkenBrack, then district attorney for the Twenty-First Judicial District (Mesa County), also spoke in favor of the bill before the House Judiciary Committee at the January 26th hearing. ErkenBrack testified that the law would directly affect a case then pending in Mesa County in which psychiatric reports concerning the defendant’s competency were conflicting. His concern was that the court would have no choice but to terminate the criminal proceedings should it believe that the defendant would not be restored to competency in the foreseeable future. “And, yet, the statute of limitations is running, which is three years, and in three years we will have no opportunity to prosecute this case in the event that she is restored to competency.” Id.
ErkenBrack also believed that the amendment would allow the district attorney to control the continued commitment of an incompetent defendant. However, Representative Foster did not discuss the bill in these terms. For example, in his closing comments before the House Judiciary Committee, Foster explained that the amendment “simply stops the statute of limitations from running.”
Id.
Later, Foster stated “[a]ll we’re talking about here is not the DA deciding whether [an incompetent defendant] is released or not, but whether the charges will continue to pend.”
Id.
Since Representative Foster was the sponsor of the bill, his statements concerning the bill’s purpose should be accorded substantial weight.
See North Haven Bd. of Educ. v. Bell,
A court also may consider the title of the legislation in resolving uncertainties concerning legislative intent.
City of Ouray v. Olin,
We also recognize that statutory terms should be construed in a manner that avoids constitutional infirmities.
Committee for Better Health Care v. Meyer,
In
Jackson,
the United States Supreme Court considered the constitutionality of Indiana’s system for pre-trial commitment of a criminal defendant. The defendant was a mentally retarded deaf mute who could communicate only to a limited extent by sign language. After the defendant was indicted on two counts of robbery, the trial court found him to be incompetent to proceed and committed him to the state department of mental health “until sane.” Practically speaking, this was a commitment for life since the defendant would never attain the competence required for trial. On certiorari, the Supreme Court held that the defendant had been deprived of equal protection because Indiana’s statutes subjected criminal defendants to a more lenient commitment standard and a more stringent standard of release than those applied to persons not charged with crimes.
Id.,
The Court thus held that a person charged with a criminal offense who is committed solely on account of his incompetency 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 obtain that capacity in the foreseeable future.”
Id.,
However,
Jackson
makes it clear that a state cannot continue to confine the defendant under its criminal commitment statutes if it is unlikely that the defendant ever will attain competency. When the determination is made that there is no substantial probability that the defendant will be restored to competency, “the State
must
either institute the customary civil commitment proceeding that would be required to commit indefinitely any other citizen, or release the defendant.”
The People maintain that, even if the district attorney has such discretion, Colorado’s criminal commitment statutes nonetheless comply with Jackson because they contain significant procedural safeguards which protect an incompetent defendant from being inappropriately committed for an indefinite period. Specifically, the People argue that section 16-8-112(2) allows the trial court to order outpatient treatment in any case where the defendant is not charged with a violent offense; section 16-8-112(3) leaves the trial court discretion to release any defendant on bond; and section 16-8-114.6(2) mandates that the trial court review the defendant’s case at least every six months with regard to the justification for continued confinement. Finally, section 16-8-114.5(1) dictates that the defendant cannot be committed for a period in excess of the minimum term which could be imposed for the offense for which he is charged, less any earned time to which he would be entitled under the state’s parole eligibility formula. We reject the People’s analysis.
In
Parks,
this court upheld the constitutionality of Colorado’s criminal commitment statutes in a case involving a defendant found to be incompetent to proceed. However,
Parks
does not support the proposition that the state can continue to hold the defendant under a criminal commitment once it has been determined that the defendant is unlikely to attain competency in the foreseeable future. In fact, we explicitly stated in
Parks
that “[i]f it becomes apparent that the defendant is unlikely to ever regain competency to stand trial, then civil commitment proceedings should be instituted.” 180 Colo, at 207,
We realize that continued commitment of the defendant still may be necessary for the protection of society. However, the mere filing of criminal charges does not justify less procedural and substantive protections than are available to others against whom criminal charges have not been filed.
Jackson,
In light of these constitutional concerns and the legislative history of H.B. 1197, we hold that section 16-8-114.5(2) as amended gives the district attorney the authority to initiate the termination of criminal proceedings against an incompetent defendant. However, the statute does not give the district attorney the power to dictate whether the defendant will be released or civilly committed once the trial court determines that there is not a substantial probability that the defendant will be restored to competency in the foreseeable future.
IV
Having concluded that the legislature did not intend to give the district attorney control over the trial court’s decision to release or civilly commit an incompetent defendant, we now must consider whether requiring a motion by the district attorney before the trial court can terminate the criminal action comports with the United States and Colorado Constitutions. The trial court concluded that this requirement violates due process because it allows criminal charges to remain pending against an incompetent defendant even though those charges can never be *1242 proved since the defendant lacks the mental capacity to be tried. The trial court also held that the requirement violates the separation of powers doctrine because it gives the district attorney “veto power” over the dismissal decision. We will address each of these arguments in turn.
A
In declaring the amended statute to be an unconstitutional violation of due process, the trial court apparently believed that the defendant has a right to dismissal of criminal charges if it does not appear reasonably likely that he will be competent to stand trial in the future. We disagree.
The question of the disposition of criminal charges against an incompetent defendant was left unanswered by the United States Supreme Court in
Jackson.
The defendant had argued that “fundamental fairness” required that the charges against him be dismissed, whereas the state believed that it was entitled to hold the charges pending indefinitely.
Several courts have considered this issue in light of
Jackson,
but none has held that charges against an incompetent accused must be dismissed as a matter of due process.
See, e.g., State v. Gaffey,
An examination of incompetency laws in other states supports the view that the dismissal of criminal charges against incompetent defendants is a legislative choice and is not constitutionally compelled. In some states, a trial court must dismiss the charges if it determines that the defendant will probably remain incompetent to proceed. See, e.g., Mo.Ann.Stat. § 552.020.10(6) (Vernon 1987); Mont.Code Ann. § 46-14-221(2) (1993). In other states, dismissal of criminal charges is discretionary. See, e.g., Ariz. R.Crim.P. 11.6(e); Ark.Code Ann. § 5-2-310(c) (Michie 1993); Haw.Rev.Stat. § 704-406(3) (1992 Supp.). In still others, the trial court must dismiss the charges against an incompetent defendant in some circumstances, whereas dismissal is discretionary in others. See Minn.R.Crim.P. 20.01(6) (providing that the criminal proceedings must be dismissed if the prosecuting attorney has not filed a notice of intention to prosecute the defendant when he has been restored to competency unless the defendant is charged with murder); N.J.Rev.Stat. §§ 2C:4-6c and -6e (1982).
The reasons for allowing criminal charges to remain pending are clear. As the New Jersey Supreme Court explained in
Gaffey,
the decision to dismiss charges based only on the likelihood of recovery “is purely prognostication,” and may turn out to be incorrect.
[tjhe risk of error can increase when the determination is made within a relatively short time following defendant’s incompetency. Hence, if such a prediction is or can be wrong, other considerations, such as the protection of society and the public interest in effective law enforcement, militate strongly in favor of the right to contin *1243 ue or renew the prosecution or at least preserving the opportunity to do so.
Id. at 517.
Allowing the criminal charges to remain pending does not mean that the defendant will never have the opportunity to have the charges dismissed. By statute, the defendant’s counsel may assert any legal objection to the prosecution which is susceptible to determination prior to trial and does not require the personal participation of the defendant. § 16-8-112(4), 8A C.R.S. (1986).
See also Ex parte Kent,
We recognize that at least two federal courts prior to
Jackson
held that criminal charges against an incompetent defendant must be dismissed as a matter of due process.
See United States ex rel. von Wolfersdorf v. Johnston,
[Civil commitment proceedings] shall not be initiated or carried out involving a person charged with a criminal offense unless or until the criminal offense has been tried or dismissed; except that the judge of the court wherein the criminal action is pending may request the district or probate court to authorize and permit such proceedings.
(Emphasis added). 7 Therefore, there is no statutory support for the proposition that Zapotocky will be deprived of the treatment opportunities available through civil commitment in the event that the district attorney does not move to terminate the criminal proceeding. 8
We therefore hold that section 16-8-114.-5(2), requiring a motion by the district attorney before the criminal proceedings against an incompetent defendant can be terminated, does not violate due process.
B
The trial court also held that section 16-8-114.5(2) violates the separation of powers doctrine because it deprives the trial court of the ability to dismiss a case and makes the district attorney the final arbiter of the defendant’s fate. Again, we disagree.
Article III of the Colorado Constitution divides the powers of state government into three distinct branches or departments and directs that “no person or collection of persons charged with the exercise of powers properly belonging to one of these departments shall exercise any power properly belonging to either of the others.” This
*1244
precept, also known as the separation of powers doctrine, imposes on the judiciary both a proscription against interfering with the executive or legislative branches, and a duty to perform its constitutional and statutory obligations with complete independence.
Pena v. District Court,
This ease requires us to examine the role of the district attorney and the trial court with respect to the dismissal of criminal charges. At common law, the trial court had no power to enter or to direct the district attorney to enter a dismissal.
People v. Dennis,
This is not to say that a trial court cannot exercise its supervisory authority and dismiss pending charges against a defendant on constitutional grounds.
See United States v. Turner,
Under the 1989 amendments to section 16-8-114.5(2), the legislature has transferred the decision to dismiss pending criminal proceedings against incompetent defendants from the trial court to the district attorney. Placing the termination decision with the district attorney is consistent with the traditional powers of the trial court and the prosecutor. Therefore, section 16-8-114.5(2) does not violate separation of powers principles.
V
Finally, Zapotocky argues that the current version of section 16-8-114.5(2) should not be applied to him since his criminal proceeding was initiated and pending before the statute was amended. According to Zapotocky, application of the amended statute to him runs counter to principles of statutory construction and constitutes a violation of the proscription against ex post facto laws. 9 We disagree.
As a general rule, changes in statutes are presumed to be prospective in application. § 2-4-202, IB C.R.S. (1980);
Continental Title Co. v. District Court,
A statute is not rendered unconstitutional as an ex post facto law merely because the facts upon which it operates occurred before the adoption of the statute.
Billips,
To be retrospective, the law must change the legal consequences of acts completed before its effective date.
Weaver,
The “act” upon which both the pre-1989 and the amended statute operate is the determination by the trial court that there is a substantial probability that the defendant will not be restored to competency in the foreseeable future. Under both versions of the statute, the criminal proceedings cannot be terminated until the trial court makes this finding, even though the institution treating the defendant may have previously prepared a report regarding his or her competency. This is because competency to stand trial is a matter for judicial determination; it is not a finding made on the basis of rubber-stamping the report of a psychiatrist.
Haskins,
Here, expert evidence was presented before the statute was amended to establish that Zapotocky would not be restored to competency. The trial court, however, explicitly declined to make a finding of indefinite incompetency until February 19, 1993— several years after the statute was amended. Since, under both versions of section 16 — 8— 114.5(2), a court cannot terminate criminal proceedings against an incompetent defendant until this finding is made, and the trial court did not make this finding until after the statute was amended, no retrospective application is involved in this ease. Accordingly, application of the amended statute to Zapo-tocky does not violate the ex post facto clauses of the United States and Colorado Constitutions.
VI
In summary, we hold that the trial court erred in declaring section 16-8-114.5(2) to be unconstitutional. Properly construed, the statute requires only that the district attorney file a motion before the trial court can dismiss criminal proceedings against an incompetent defendant, and does not affect the trial court’s duty to release or civilly commit an incompetent defendant once it determines that the defendant is unlikely to be restored to competency in the foreseeable future. This requirement does not violate Zapo-tocky’s due process rights or the doctrine of separation of powers. In addition, application of the amended statute to Zapotocky was not ex post facto because the trial court’s finding of indefinite incompetency occurred after the amended statute became effective. Therefore, we reverse and remand the case to the trial court for further proceedings consistent with this opinion.
Notes
. We have jurisdiction over this appeal pursuant to section 13-4-102(l)(b), 6A C.R.S. (1993 Supp.).
. This statutory subsection provides, in pertinent part:
If the final determination is that the defendant is incompetent to proceed, the court shall commit Ae defendant to Ae custody of Ae department of institutions, ... Such commitment or treatment shall continue until the defendant is found competent to proceed or until otherwise terminated under Ae provisions of section 16-8-114.5.
. Zapotocky appealed this decision to the court of appeals. In an unpublished decision, People v. Zapotocky, No. 89CA0872 (Colo.App. Oct. 25, 1990), the court of appeals dismissed the appeal because there was no final order.
. However, the trial court may continue the proceeding to decide matters which are susceptible to determination prior to trial and which do not require the personal participation of the defendant. § 16-8-112(4), 8A C.R.S. (1986).
. In 1989, section 16-5-401(l)(a) provided that the prosecution must be commenced within a particular limitations period running from the commission of an offense. A defendant’s incompetency did not toll the limitations period. See § 16-5-401(2) to (9), 8A C.R.S. (1986 and 1989 Supp.).
. The right to a speedy trial is guaranteed under the Sixth Amendment of the United States Constitution and article II, section 16, of the Colorado Constitution.
. In fact, at the February 2, 1989 hearing, the trial court stated that it was prepared to ask the district court to authorize civil commitment of Zapotocky pursuant to section 27-10-123.
.Zapotocky states that termination of the criminal proceeding is necessary to secure funding through other state agencies. However, he does not point to a state statute or regulation which would compel this result.
. The trial court requested briefs regarding the applicability of the amended statute to Zapo-tocky’s case. However, no briefs or a trial court ruling on this issue appears in the record.
