
199 P.3d 654 (2008)
Aaron Jaydon NOWELL, Petitioner,
v.
The Honorable Brian S. REES, Judge Pro Tem of the Superior Court of the State of Arizona, in and for the County of Maricopa, Respondent Judge,
State of Arizona, Real Party in Interest.
No. 1 CA-SA 08-0102.
Court of Appeals of Arizona, Division 1, Department C.
July 31, 2008.
Review Denied January 6, 2009.
*656 Office of the Legal Advocate By Frances Gray, Deputy Legal Advocate, Thomas J. Dennis, Deputy Legal Advocate, Phoenix, Attorneys for Petitioner.
Andrew P. By Thomas, Maricopa County Attorney By Gerald R. Grant, Deputy County Attorney, Phoenix, Attorneys for Real Party in Interest.

OPINION
IRVINE, Presiding Judge.
¶ 1 Aaron Jaydon Nowell ("Nowell") contends that the trial efforts to restore his competency to stand trial proved unsuccessful. The issue we must decide is whether Arizona Revised Statutes ("A.R.S.") sections 13-4501 through -4517 (2001 and Supp. 2007)[1] and Rules 11.1 through 11.6 of the Arizona Rules of Criminal Procedure limit restoration efforts to the twenty-one months after a criminal defendant is first found to be incompetent. For the following reasons, we hold that the plain language of the statutes and rules limits the trial court's authority to order restoration to the twenty-one months after the original finding of incompetency.

FACTS AND PROCEDURAL HISTORY
¶ 2 Nowell was arrested on February 2, 2004 for allegedly entering and causing damage to an abandoned nursing home. The State charged Nowell with one count of burglary in the second degree, a class 3 felony; and one count of criminal damage, a class 4 felony. On the motion of Nowell's attorney, competency proceedings pursuant to Rule 11 were initiated in the superior court. On November 2, 2004, Commissioner Vatz found Nowell was incompetent but that there was no clear and convincing evidence that he would not be restored within fifteen months. A restoration treatment provider was assigned to work with Nowell. That provider submitted a report to the trial court dated December 20, 2004, opining that Nowell was restored to competency. After an evidentiary hearing on June 17, 2005, Commissioner *657 Vatz disagreed and found that Nowell remained incompetent, so he ordered additional restoration treatment with a new provider, Dr. June Stapleton.
¶ 3 On November 27, 2005, Dr. Stapleton submitted a report opining that Nowell was restored to competency. Nowell requested an evidentiary hearing, which was held on June 9 and 12, 2006, before Commissioner Hintze, who had replaced Commissioner Vatz as the assigned judicial officer. Significantly for our purposes, these hearings took place just over twenty months after the original determination that Nowell was incompetent. Dr. Stapleton was not called to testify, but her opinion was introduced through her written report. Following the hearings, Commissioner Hintze ruled that Nowell was restored to competency and transferred the case to the trial judge to commence regular proceedings.
¶ 4 Nowell, acting through counsel, filed a special action with this Court challenging the finding of competency. After briefing and argument we issued an order on March 22, 2007, vacating the determination of competency and remanding the case for a new competency determination. Our ruling stated that the prior adjudications of incompetency gave rise to a presumption of continued incompetence. Nowell v. Hintze, 1 CA-SA 06-0236 at 2 (Ariz.App. March 22, 2007) (decision order) (citing State v. Hehman, 110 Ariz. 459, 460, 520 P.2d 507, 508 (1974)). Therefore, we stated:
For competency to be restored or regained there must be a positive change in the defendant's condition indicating that he is now able to understand the proceedings against him and assist his own defense, whereas he could not previously do so. It is not enough for a new expert to disagree with the previous determination. A new expert must be able to explain that restoration efforts were effective, and the trial court must make findings to that effect. In this case it appears that Dr. Stapleton simply disagreed with the prior experts and concluded that Petitioner was competent. The trial court made no findings concerning the effects of the restoration efforts. Given the presumption of continued incompetence, more was required. Therefore, we vacate the order of July 3, 2006 and order a new determination of competency.
Id.
¶ 5 In the trial court, the newly assigned judicial officer, Commissioner Spencer, elected to follow our order by appointing a new expert to opine regarding Dr. Stapleton's conclusion that Nowell had been restored to competency. The new expert submitted a written report to the court dated December 22, 2007, in which he concluded that Dr. Stapleton's reports and documentation did not adequately justify her conclusion that Nowell was restored to competency. On March 5, 2008, following an evidentiary hearing, Commissioner Spencer issued a ruling finding that Nowell remained incompetent, but finding no clear and convincing evidence that he could not be restored to competency within the statutory time frames.
¶ 6 How to calculate those time limits was addressed separately. Nowell had filed a motion to dismiss the charges, arguing that the twenty-one month outer limit for court-ordered restoration treatments had passed. That motion was taken under advisement by Commissioner Spencer, apparently to allow time for the information from the new expert she appointed to be received and evaluated. Pending that decision, the motion to dismiss raising the time limit issue was transferred to Commissioner Rees for decision.
¶ 7 In his motion Nowell argued that A.R.S. §§ 13-4515, 13-4517, and Rule 11.6 mandate dismissal if more than twenty-one months have passed since the original finding of incompetency. Because more than three years had passed in his case, Nowell argued dismissal was required. The State responded that the twenty-one months only included time actually being treated by a restoration provider under a restoration order. The State calculated that Nowell spent approximately two months in restoration treatment with the first provider and approximately six months with Dr. Stapleton, so no more than eight of twenty-one months had been used up.
*658 ¶ 8 In a March 7, 2008 ruling the trial court adopted an interpretation of the statutes and rules different from that urged by either party. It stated:
The Court's decision is not based upon either the State's or the Defendant's theory for calculating time. Rather, the Court holds that each time a defendant is found not competent and placed into restoration it creates a new period of time for restoration. In other words, it creates a new "original finding of incompetency." This holding is the most consistent with the realities of criminal litigation and Chapter 41 of Title 13, ARS.
....
Consistent with ARS section 13-4412(I), the Court hold[s] that once the treatment provider submits a report finding a defendant competent the twenty-one month clock stops. Nonetheless, [u]sing the Defendant's strict calendar time theory would create an unreasonable burden to have rushed hearings in order to complete restoration within 21 months from the initial order. Rather, when a court finds that the doctor's report is not persuasive, the court must make a new finding that the defendant is not competent and restorable, starting the process anew.
The Court finds that the Court's order finding the defendant not competent but restorable was no longer "valid" on December 20, 2004 when Dr. Cheifitz submitted a report that the Defendant was competent. The Court then made another finding and order that the Defendant was not competent but restorable on 6/17/05. That order became invalidated on 11/27/05 when Dr. Stapleton issued a report that the defendant was competent to stand trial. Finally, on March 5, 2008, the Court issued a new order finding the defendant not competent but restorable. Therefore, we are now operating from that date.
(Emphasis in original.)
¶ 9 The trial court expressly recognized that Nowell's interpretation best fits the plain meaning of the statutes, but concluded that it was unworkable and inefficient because "it does not permit the realities of litigation." Therefore, the trial court now intends to order continued restoration and fresh evaluations, with the only time limit being twenty-one months from the most recent finding of incompetency on March 5, 2008.

JURISDICTION AND STANDARD OF REVIEW[2]
¶ 10 Our decision to accept special action jurisdiction is largely discretionary. State ex rel. McDougall v. Superior Court, 186 Ariz. 218, 219, 920 P.2d 784, 785 (App. 1996). Arizona Rule of Procedure for Special Actions 1(a) states that "the special action shall not be available where there is an equally plain, speedy, and adequate remedy by appeal." A trial court's denial of a motion to dismiss is a non-appealable, interlocutory order. Henke v. Superior Court, 161 Ariz. 96, 98, 775 P.2d 1160, 1162 (App.1989). Therefore, we accept jurisdiction of this special action because the denial of a motion to dismiss is a non-appealable order, the issue raised is one of law and is likely to recur, and Nowell does not have an equally plain, speedy, or adequate remedy by appeal. Ariz. R.P. Spec. Act. 1(a); Boynton v. Anderson, 205 Ariz. 45, 46, ¶ 3, 66 P.3d 88, 89 (App.2003). We thus have jurisdiction pursuant to A.R.S. § 12-120.21(A)(4) (2003).
¶ 11 We review a motion to dismiss a criminal prosecution for an abuse of discretion. Taylor v. Cruikshank, 214 Ariz. 40, 43, ¶ 10, 148 P.3d 84, 87 (App.2006). "A trial court abuses its discretion when it misapplies the law or predicates its decision on incorrect legal principles." Id. (quoting State v. Jackson, 208 Ariz. 56, 59, ¶ 12, 90 P.3d 793, 796 (App.2004)). Additionally, we review a trial court's interpretation of statutes and rules de novo as questions of law. See P.M. v. Gould, 212 Ariz. 541, 544, ¶ 12, 136 P.3d 223, 226 (App.2006).


*659 DISCUSSION
¶ 12 Nowell argues that the trial court erred by denying his motion to dismiss the criminal charges without prejudice. Specifically, he contends that the trial court erred in its interpretation of the time limit for court-ordered competency restoration efforts contained in the statutes and rules. Nowell interprets the plain meaning of A.R.S. §§ 13-4501 through -4517 and Rules 11.1 through 11.6 as limiting restoration efforts to the twenty-one months after the court's first finding of incompetency. Nowell contends that the trial court deviated from the plain meaning of the statutes and rules by interpreting them in an arbitrary and novel manner. Nowell also argues that the court's ruling deprives him of his rights to due process, equal protection, and a speedy trial. See U.S. Const. amends. VI, XIV; Ariz. Const. art. 2, §§ 4, 13, and 24.
¶ 13 Although the State does not agree with the trial court's interpretation of the statutes and rules, it argues that the court did not err in denying Nowell's motion to dismiss. The State interprets the twenty-one month time period as applying only to the actual time in which a defendant is undergoing restoration treatment, not any time spent waiting for hearings or appointments. It contends that Nowell has spent approximately eight months in court-ordered restoration treatment since the court's initial finding that he was incompetent but restorable. Therefore, the State contends that Nowell has not exceeded the twenty-one month restoration period. It also contends that Nowell's interpretation of the time period allows little or no time for restoration before dismissal would be required. Finally, it argues that Nowell caused numerous delays during the Rule 11 competency proceedings, implying that these should not be counted against the twenty-one months.
¶ 14 This case requires us to interpret the statutes and rules that govern competency in criminal prosecutions. We must determine how to calculate the twenty-one month time period prescribed for restoration treatment. When interpreting statutes and rules, our main goal is to determine and give effect to legislative intent. State v. Ross, 214 Ariz. 280, 283, ¶ 22, 151 P.3d 1261, 1264 (App.2007). We first look to the plain language of a statute or rule; if that language is clear, we apply it. Fragoso v. Fell, 210 Ariz. 427, 430, ¶ 7, 111 P.3d 1027, 1030 (App.2005). If that language is ambiguous, "we attempt to determine legislative intent by interpreting the statutory scheme as a whole and consider the statute's context, subject matter, historical background, effects and consequences, and spirit and purpose." Ross, 214 Ariz. at 283, ¶ 22, 151 P.3d at 1264 (quoting Hughes v. Jorgenson, 203 Ariz. 71, 73, ¶ 11, 50 P.3d 821, 823 (2002)).
¶ 15 Many controversies concerning the competency of a criminal defendant have revolved around when a competency proceeding is required and the standards for determining competency. In this case, however, the relevant statutes and rules are those that address what happens after a defendant is initially determined to be incompetent. Once this initial determination is made the trial court must (1) decide whether to order restoration treatment, (2) evaluate the progress of any ordered restoration, and (3) ultimately conclude the process after the defendant has been restored to competency or remains incompetent. We address each of these stages in turn.
¶ 16 Once a defendant has been found incompetent, the trial court must determine whether treatment should be ordered. Restoration treatment is plainly the preferred course under the statute. The only exception is if "there is clear and convincing evidence that the defendant will not be restored to competency within fifteen months." A.R.S. § 13-4510(C); see also Rule 11.5(b)(3) (the court shall order restoration "unless there is clear and convincing evidence that defendant will not regain competency within 15 months"). The statute allows restoration to be extended for an additional six months "if the court determines that the defendant is making progress toward the goal of restoration." A.R.S. § 13-4510(C). In effect, the statute and rule require restoration treatment unless the evidence shows the defendant will not become competent within twenty-one months. If *660 such evidence exists, the court need not order fruitless treatment. If "there is no substantial probability that the defendant will become competent within 21 months of the date found incompetent" the court may, upon request of any party (1) remand defendant for civil commitment proceedings, (2) order appointment of a guardian, or (3) dismiss the charges without prejudice. Rule 11.5(b)(2); see also A.R.S. § 13-4517. Thus, under some circumstances restoration treatment will not be ordered, but in most cases, such as this one, restoration must be attempted.
¶ 17 Once the trial court decides restoration treatment is appropriate, it must specify the details of that treatment in its order. A.R.S. § 13-4510(D); Rule 11.5(b)(3). The trial court must also order periodic progress reports from the person supervising the restoration treatment. Rule 11.5(d); see also A.R.S. § 13-4514(A) and (B) (detailing treatment provider's reporting obligations). A treatment order is valid for one hundred eighty days. A.R.S. § 13-4512(I); see also Rule 11.5 comment ("No order under this section is to be effective for longer than six months, thereby insuring a frequent review of each incompetent's status and progress."). The statute provides that the order may become invalid if the charges are dismissed, the maximum sentence for the offense charged has expired, a physician determines the defendant is competent to stand trial, or the treating facility submits a report that the defendant has regained competency or there is no substantial probability the defendant will do so within twenty-one months of the original finding of incompetency. A.R.S. § 13-4512(I)(1), (2), (3) and (4). Absent any of these circumstances, the next stage is for the trial court to evaluate the progress of the restoration treatment.
¶ 18 The statutes require that upon receipt of a report from the restoration provider the trial court "shall hold a hearing to determine the defendant's progress towards regaining competency." A.R.S. § 13-4514(C). If the defendant has regained competency, the criminal prosecution resumes its normal course. A.R.S. § 13-4514(D). If the defendant continues to be incompetent, however, the court must determine whether further restoration attempts are warranted. Subsections (E) and (F) of § 13-4514 provide:
E. If at the hearing the court finds that the defendant is incompetent to stand trial but that there is a substantial probability that the defendant will regain competency within the foreseeable future, the court shall renew and, if appropriate, modify the treatment order for not more than an additional one hundred eighty days. The court may make this determination without a formal hearing if all of the parties agree.
F. If at the hearing the court finds that the defendant is incompetent to stand trial and that there is not a substantial probability that the defendant will regain competency within twenty-one months after the date of the original finding of incompetency, the court shall proceed pursuant to § 13-4517.
Consistent with the statute, Rule 11.6(d) provides:
Finding of Continuing Incompetency. If the court finds that the defendant is still incompetent, it shall proceed in accordance with rules 11.5(b)(2) and (3) unless the court determines that there is a substantial probability that the defendant will regain competency within the foreseeable future, then the court shall renew and may modify the treatment order for not more than an additional 180 days.
See also Rule 11.6(d) comment ("This section directs the trial court upon finding that the defendant is still incompetent to reconsider the alternatives presented in Rule 11.5(b)(2) and (3).").
¶ 19 Pursuant to these provisions, if a defendant continues to be incompetent but restoration still seems likely, treatment may be extended for an additional one hundred eighty days. If there is not a substantial probability of restoration within twenty-one months of the original finding of incompetency, the statute once again provides that any party may request that the court (1) remand the defendant for civil commitment proceedings, (2) order appointment of a guardian, or (3) dismiss the charges without prejudice. A.R.S. § 13-4517; see also Rule 11.6(d) (incorporating *661 Rule 11.5(b)(2)). Thus, the cycle may continue in one hundred eighty day increments so long as continued treatment seems likely to be successful.
¶ 20 The cycle will not, however, continue indefinitely. See Rule 11.6(e) comment (citing a United States Supreme Court decision as holding "that indefinite suspension of a prosecution violated the petitioner's constitutional right to a speedy trial"). The statutes and rules include an outer limit to the duration of court ordered restoration treatment and the time that treatment may be undertaken. Section 13-4515(A) provides:
An order or combination of orders that is issued pursuant to § 13-4512 or 13-4514 shall not be in effect for more than twenty-one months or the maximum possible sentence the defendant could have received pursuant to § 13-604, 13-604.01, 13-702, 13-703 or any section for which a specific sentence is authorized, whichever is less. In making this determination the court shall not consider the sentence enhancements under § 13-604 for prior convictions.
This twenty-one month period for restoration efforts is also included in various forms in A.R.S. §§ 13-4510(C), -4512(I)(1), -4514(A)(4) and (F), -4517, and Rule 11.5(b)(2), (3) and (d). Sections 13-4512(I)(1), -4514(A)(4) and (F), and -4517, specifically tie the twenty-one months to "the date of the original finding of incompetency." Rule 11.5(b)(2) ties the twenty-one months to "the date found incompetent," while Rule 11.5(d) refers to within twenty-one months of "the court's finding of incompetence."
¶ 21 We cannot ignore the repeated statutory references to restoration of competency within twenty-one months after the date of the original finding of incompetency. If this time limit is to have any meaning, it must be applied as written and the trial court's ruling that the twenty-one months begins anew with every new finding of incompetency is incorrect. As the trial court itself acknowledged, its interpretation is contrary to the plain meaning of the statutes. Therefore, we find the statutes mean what they say. If a defendant has not regained competency within twenty-one months of the original finding of incompetency, no further attempts at restoration are allowed. At that point the options available to the trial court are to dismiss the charges without prejudice, appoint a guardian, or order the institution of civil commitment proceedings.
¶ 22 We disagree with the trial court's conclusion that it has the implied authority to toll the time or start anew the clock because it makes sense to do so given that the realities of litigation sometime result in justified delays. In effect, the trial court seeks to create a system of time limits similar to Rule 8 of the Arizona Rules of Criminal Procedure, which applies to speedy trial determinations. Rule 8.4, however, expressly provides for excluding time and specifically defines what time may be excluded. No such exclusions are provided in the statutes or rules at issue here. The legislature clearly specified how long restoration efforts should be allowed to continue  twenty-one months. On the record before us, we see no reason to read any exclusion into the statutes.
¶ 23 The State argues that twenty-one months of restoration may be insufficient in some cases. The record in this case fails to support the State's argument. Here, there was enough time after the original finding of incompetency for two restoration providers to be appointed, do their work, and report back to the trial court. The trial court had time to hold several hearings to evaluate those reports. On this record, we see no reason to deviate from the plain language of the statutes and rules to extend the time limit.[3]
¶ 24 The trial court was also concerned that the time limit will encourage defendants to delay treatment. Although we recognize this possibility, twenty-one months seems sufficient to accommodate some delay. Moreover, we believe the trial court has authority to deal with such attempts. In any event, that issue is not present in this case. *662 The trial court specifically found that "there are no allegations that any party acted in bad faith." Neither party in this case seemed in a particular hurry to conclude the competency proceedings, so we are not persuaded that any delays caused by Nowell should override the specific time limit contained in the statutes.
¶ 25 Finally, the State argues that the statutes and rules should not be applied to require the dismissal without prejudice of the charges against Nowell because the State can just re-file the charges. Nowell responds that there may be limits on the State's authority to refile the charges. We decline to address that issue. Whether the State re-files is not for us to decide. The only issue before us is the time limit on restoration efforts. Pursuant to the statutes enacted by the Legislature and the rules adopted by the Arizona Supreme Court, if there is no substantial probability that the defendant will become competent within twenty-one months of the original finding of incompetence, restoration efforts must cease. At that point, the defendant continues to be incompetent to stand trial and the trial court has no choice but to dismiss the charges without prejudice.
¶ 26 Our order in the first special action directed the trial court to re-evaluate the evidence concerning Nowell's competency. It did so and concluded that the evidence presented at the July 2006 hearings was inadequate to find that Nowell had been restored to competency. In light of that ruling, the result of the July 2006 hearings was effectively modified to be a finding that Nowell continued to be incompetent. As of July 2006, more than twenty months had elapsed since the original finding that Nowell was incompetent. In other words, less than a month remained for restoration treatment. No one argues that this time was sufficient for additional restoration treatment. Therefore, as a matter of law, we can conclude that as of that time there was no substantial probability that Nowell would regain competency within twenty-one months after the date of the original finding of incompetency.[4]
¶ 27 Under these circumstances, the trial court had no authority to order further restoration efforts. The plain language of these provisions requires that restoration efforts must end within twenty-one months of the original finding of incompetency. If a defendant is not restored to competency within twenty-one months, the statutes provide that the court may dismiss the case without prejudice, refer the defendant for commitment proceedings, or appoint a guardian for the defendant. Neither party argues that the trial court should appoint a guardian or begin commitment proceedings, so the question before us is whether the trial court should dismiss the charges because the time limit for restoration attempts had passed. Given the constitutional prohibition against trying a defendant who is incompetent, we conclude that the trial court's only alternative in this case is to dismiss the charges. Therefore, we grant relief to Nowell.

CONCLUSION
¶ 28 For the foregoing reasons we accept jurisdiction and grant relief. Based on the plain meaning of A.R.S. §§ 13-4501 through -4517 and Rules 11.1 through 11.6, we find that the time period during which a defendant may be ordered to undergo restoration services is twenty-one months after the court's original finding of incompetency. If a defendant has not been restored twenty-one months after the original finding of incompetency, the court must follow the statutes and rules and dismiss the case without prejudice, appoint a guardian, or remand the defendant for civil commitment proceedings. Because neither party argues for the latter two options, we order the trial court to dismiss the charges against Nowell without prejudice.
CONCURRING: MICHAEL J. BROWN and JOHN C. GEMMILL, Judges.
NOTES
[1]  We cite the current version of A.R.S. §§ 13-4505, -4508, and -4512 because no revisions material to this decision have occurred.
[2]  Initially, the State argued that we should decline jurisdiction. At oral argument, it changed its position and agreed with Nowell that we should accept jurisdiction of the case to clarify the applicable time limits.
[3]  We note that the statutes governing competency in juvenile cases limit restoration efforts to 240 days, or approximately eight months. A.R.S. §§ 8-291.09(F), -291.10(F) (2007). If the juvenile cannot be restored to competency, the matter will be dismissed with prejudice. A.R.S. § 8-291.08(D) (2007).
[4]  Because we count the time from November 2004, when Nowell was originally found to be incompetent, to July 2006, before any appellate proceeding commenced, we need not consider whether the time the issue was pending before this court counts toward the twenty-one month time limit.
