
200 P.3d 1275 (2009)
STATE of Kansas, Appellee,
v.
Kendrick D. GRACEY, Appellant.
No. 99,310.
Supreme Court of Kansas.
February 6, 2009.
*1277 Carl Folsom, III, of Kansas Appellate Defender Office, argued the cause, and Sarah Morrison, of the same office, was with him on the briefs for the appellant.
David Lowden, chief appellate attorney, argued the cause, and Nola Tedesco Foulston, district attorney, and Stephen N. Six, attorney general, were with him on the briefs for the appellee.
The opinion of the court was delivered by ROSEN, J.:
Kendrick D. Gracey appeals from the sentence imposed following a plea of guilty to one count of aggravated indecent liberties with a child.


*1278 Facts

Kendrick Gracey has an IQ of 50 and was 21 years old at the time of the event that resulted in his conviction. On December 31, 2006, Wichita police investigated a report that Gracey sexually touched a 12-year-old girl. The victim told police that she was asleep on a living-room couch and was awakened by Gracey poking his finger on the outside of her pajama bottoms on top of her vagina. Gracey then ran out of the room. Shortly afterwards he peeked into the living room and gestured for the victim to approach him. He then told the victim that he liked her. In a taped interview, Gracey confirmed the victim's story, adding that he thought she was 16 years old.
Under the facts of this case, the State had several filing options. This court was unable to learn from the record or from the attorneys arguing the case on appeal why the State elected to charge the most severe off-grid offense possible, K.S.A.2006 Supp. 21-3504(a)(3)(A) and (c), subjecting Gracey to a presumptive life sentence with a mandatory minimum 25 years imprisonment under K.S.A.2006 Supp. 21-4643(a)(1)(C). That decision nevertheless was within the discretion of the prosecuting attorney, and on January 4, 2007, the State filed a complaint/information charging Gracey with one count of aggravated indecent liberties with a 12-year-old child. Gracey subsequently entered a plea of guilty to aggravated indecent liberties with a child, and the State agreed to join in requesting a downward durational departure. The district court granted the durational departure but found it was barred by statute from granting the dispositional departure that Gracey sought. The district court sentenced Gracey to a prison term of 55 months, a downward durational departure from the low-end presumptive sentencing range for a severity-level 3, criminal-history H nondrug felony. Gracey filed a timely notice of appeal, and this court assumed jurisdiction under K.S.A. 22-3601(b) and K.S.A. 21-3504(c)(conviction of off-grid person felony).

Analysis
Gracey initially argues that the district court lacked jurisdiction to sentence him under K.S.A. 21-4643 in light of a charging instrument that did not allege that he was over the age of 18.
Whether an information is sufficient to confer subject matter jurisdiction is a question of law over which an appellate court has unlimited review. State v. McElroy, 281 Kan. 256, 261, 130 P.3d 100 (2006). The test used to evaluate the sufficiency of the charging document depends upon when the issue was first raised. State v. Shirley, 277 Kan. 659, 661, 89 P.3d 649 (2004). When the charging document is challenged for the first time on appeal, the defendant must show that the alleged defect either: (1) prejudiced the defendant's preparation of a defense; (2) impaired the defendant's ability to plead the conviction in any subsequent prosecution; or (3) limited the defendant's substantial rights to a fair trial. McElroy, 281 Kan. at 261, 130 P.3d 100. "The longer it takes for the defendant to challenge the sufficiency of the information, the greater the presumption of regularity. [Citation omitted.]" State v. Hall, 246 Kan. 728, 761, 793 P.2d 737 (1990), overruled in part on other grounds Ferguson v. State, 276 Kan. 428, 78 P.3d 40 (2003).
The complaint/information reads as follows:
  "THE STATE OF KANSAS
    Plaintiff,
                  vs.
  "KENDRICK D. GRACEY
  "B/M: DOB: XX/XX/1985
  "SSN: XXX-XX-0039
  "KDR: XXXXXXXXXXXX
    Defendant.
  Case No. 07CR0020
. . . .
"COMES NOW KIM T. PARKER, a duly appointed, qualified and acting Assistant District Attorney of the 18th Judicial District of the State of Kansas, and for and on behalf of said State gives the court to understand and be informed that in the County of Sedgwick, and State of Kansas, and on or about the 31st of December, 2006, A.D., one KENDRICK D. GRACEY did then and there unlawfully, lewdly fondle *1279 or touch DHM, a child under fourteen (14) years of age, to-wit: 12 years old, date of birth XX-XX-1994, who was not then married to KENDRICK D. GRACEY, done with the intent to arouse or satisfy the sexual desires of DHM, KENRICK D. GRACEY or both; all of the said acts then and there committed being contrary to the statutes in such cases made and provided and against the peace and dignity of the State of Kansas."
It also states that the charged crime was:
"Contrary to Kansas Statutes Annotated 21-3504(a)(3)(A), Aggravated Indecent Liberties, Off-Grid Person Felony"
K.S.A. 21-3504 reads in relevant part:
"(a) Aggravated indecent liberties with a child is:
. . . .
"(3) engaging in any of the following acts with a child who is under 14 years of age:
(A) Any lewd fondling or touching of the person of either the child or the offender, done or submitted to with the intent to arouse or to satisfy the sexual desires of either the child or the offender, or both;. . .
. . . .
"(c) Except as provided further, aggravated indecent liberties with a child as described in subsections (a)(1) and (a)(3) is a severity level 3, person felony. . . . When the offender is 18 years of age or older, aggravated indecent liberties with a child as described in subsection (a)(3) is an off-grid person felony." (Emphasis added.)
K.S.A. 21-4643 provides for mandatory minimum terms of imprisonment of 25 or 40 years for certain sex offenders, with certain exceptions:
"(a)(1) Except as provided in subsection (b) or (d), a defendant who is 18 years of age or older and is convicted of the following crimes committed on or after July 1, 2006, shall be sentenced to a term of imprisonment for life with a mandatory minimum term of imprisonment of not less than 25 years unless the court determines that the defendant should be sentenced as determined in paragraph (2):
. . . .
"(C) aggravated indecent liberties with a child, as defined in subsection (a)(3) of K.S.A. 21-3504, and amendments thereto."
In addition, K.S.A. 22-3201(c) requires:
"When relevant, the complaint, information or indictment shall also allege facts sufficient to constitute a crime or specific crime subcategory in the crime seriousness scale."
Gracey contends that the absence of any reference in the charging document to his age is a jurisdictional defect that precluded the district court from sentencing him to an off-grid felony. He further notes that his acknowledgment of rights specifically stated that he was pleading to a severity level 3 crime, and at the plea hearing the district court informed him that he was pleading guilty to a severity level 3 person felony.
The State responds that the charging document set out Gracey's year of birth in its caption and stated at the bottom of the page that the charge was for an off-grid person felony. The validity of a charging instrument is to be tested by reading the document in its entirety, and the elements of the offense may be gleaned from the document as a whole. McElroy, 281 Kan. 256, Syl. ¶ 3, 130 P.3d 100.
The State notes that the plea agreement signed by Gracey and counsel for both parties states that Gracey entered a plea of guilty or nolo contendere to "Aggravated Indecent Liberties, a severity level 3 person felony, in violation of K.S.A. 21-3504(a)(3)(A). The penalty for this offense is life in prison with parole eligibility after defendant has served 25 full years in prison."
An analysis of the two competing positions must take place in light of the standard of review. As noted earlier, Gracey must demonstrate that the failure to state his age in the text of the charging instrument prejudiced his preparation of a defense, impaired his ability to plead the conviction in any subsequent prosecution, or limited his substantial rights to a fair trial. See McElroy, 281 Kan. 256, Syl ¶ 2, 130 P.3d 100. In this context, the charging deficiency, if any, does *1280 not render the conviction invalid. The document averred in its caption that he was over the age of 18 and stated at the bottom that the charge was for an off-grid felony. The document specified all the elements of aggravated indecent liberties with a child. All of these circumstances demonstrate that Gracey was adequately informed of both the crime charged and the penalty. He does not contend that the preparation of his defense or his rights to a fair trial were impaired, and the conviction has not been shown to affect any subsequent prosecution. Based on our limited standard of review, we do not find reversible error in the district court's decision to apply K.S.A. 21-4643 in sentencing Gracey.
Gracey next argues that the district court erred in refusing to consider a dispositional departure. The court found that it had statutory authority to impose a durational departure from the minimum sentence set out in K.S.A.2006 Supp. 21-4643(a)(1), in effect at time of offense (enacted L.2006 ch. 212, sec. 2), but it lacked the authority to impose a dispositional sentence of probation. Gracey argues on appeal that the district court erred in refusing to consider probation as a sentencing option.
This issue invites the court to analyze the Kansas statutory sentencing scheme. Interpretation of a sentencing statute is a question of law, and an appellate court's standard of review is unlimited. State v. Ruiz-Reyes, 285 Kan. 650, 653, 175 P.3d 849 (2008). This court has jurisdiction to review a sentence imposed under K.S.A. 21-4643(a). State v. Ortega-Cadelan, 287 Kan. 157, Syl. ¶ 3, 194 P.3d 1195 (2008).
An appellate court's first task is to "ascertain the legislature's intent through the statutory language it employs, giving ordinary words their ordinary meaning." State v. Stallings, 284 Kan. 741, 742, 163 P.3d 1232 (2007). When a statute is plain and unambiguous, this court will not speculate as to the legislative intent behind it and will not read the statute to add something not readily found in it. In re K.M.H., 285 Kan. 53, 79, 169 P.3d 1025 (2007), cert. denied ___ U.S. ___, 129 S.Ct. 36, 172 L.Ed.2d 239 (2008).
As a general rule, criminal statutes must be strictly construed in favor of the accused. Any reasonable doubt as to the meaning of the statute is decided in favor of the accused. This rule of strict construction is nevertheless subordinate to the rule that judicial interpretation must be reasonable and sensible to effect legislative design and intent. State v. Paul, 285 Kan. 658, 662, 175 P.3d 840 (2008).
As set out in our discussion of the previous issue, K.S.A. 21-4643(a)(1)(C) provides that a defendant 18 years of age or older who is convicted of the crime of aggravated indecent liberties with a child committed on or after July 1, 2006, must be sentenced to a term of imprisonment for life with a mandatory minimum term of imprisonment of not less than 25 years, subject to certain exceptions.
One exception is set out in K.S.A. 21-4643(d):
"On or after July 1, 2006, for a first time conviction of an offense listed in paragraph (a)(1), the sentencing judge shall impose the mandatory minimum term of imprisonment provided by subsection (a), unless the judge finds substantial and compelling reasons, following a review of mitigating circumstances, to impose a departure. If the sentencing judge departs from such mandatory minimum term of imprisonment, the judge shall state on the record at the time of sentencing the substantial and compelling reasons for the departure. The departure sentence shall be the sentence pursuant to the sentencing guidelines act, K.S.A. 21-4701 et seq., and amendments thereto, and no sentence of a mandatory minimum term of imprisonment shall be imposed hereunder. [A]s used in this subsection, mitigating circumstances shall include, but are not limited to, the following:
"(1) The defendant has no significant history of prior criminal activity.
"(2) The crime was committed while the defendant was under the influence of extreme mental or emotional disturbances.
"(3) The victim was an accomplice in the crime committed by another person, and the defendant's participation was relatively minor.

*1281 "(4) The defendant acted under extreme distress or under the substantial domination of another person.
"(5) The capacity of the defendant to appreciate the criminality of the defendant's conduct or to conform the defendant's conduct to the requirements of law was substantially impaired.
"(6) The age of the defendant at the time of the crime."
In considering this section, the district court must apply a two-step procedure: First, the judge is to review mitigating circumstances, and then the judge must determine whether there are substantial and compelling reasons for departure. Ortega-Cadelan, 287 Kan. at 164, 194 P.3d 1195. In determining whether mitigating circumstances under K.S.A. 21-4643 are substantial and compelling, this court applies an abuse of discretion standard. Ortega-Cadelan, 287 Kan. 157, Syl. ¶ 5, 194 P.3d 1195.
The district judge stated at the sentencing hearing:
"There is an ability perhaps to go ahead and impose a reduced sentence. I don't believe there is an ability to go beyond what the legislature has put forth and place the defendant on probation, however, for purposes of appeal, I will make the finding at this point in time that the Court cannot place the defendant on a dispositional departure. The Court will therefore not consider that departure.
"I will grant a durational departure because of the mental capacity of the defendant. I will accept and adopt the substantial and compelling reasons set forth by the parties."
Gracey contends that the statute allows for departure, and departure includes both duration and disposition. He cites K.S.A. 21-4703(f), which defines departure as a sentence "inconsistent with the presumptive sentence for an offender." The State responds that the plain language of K.S.A. 21-4643(d) requires that the departure sentence "shall be the sentence pursuant to the sentencing guidelines act, K.S.A. 21-4701 et seq." The State then argues that, although the statute does not expressly prohibit imposition of probation after departing to the guidelines sentence, the legislative intent clearly was to require imprisonment.
K.S.A. 21-4643(d) provides that in the presence of substantial and compelling reasons, the district court may impose a sentence pursuant to the sentencing guidelines. Once the sentence becomes a guidelines sentence, the district court is free to depart from the sentencing grid if it states on the record findings of fact and reasons justifying a departure that are supported by evidence in the record and are substantial and compelling. K.S.A. 21-4721(d). In the plea agreement, the State agreed that Gracey's "lower extreme" IQ went to his capacity "to appreciate the criminality" of his conduct or to conform his conduct to the requirements of the law. See K.S.A.2006 Supp. 21-4643(d)(5). The district court incorporated this agreement into its reason for imposing a guideline sentence, and the State does not dispute that reason on appeal.
The State argues that the intent of the legislature was that every person sentenced under K.S.A. 21-4643 should serve lengthy prison time, without authorizing probation. The State concedes, however, that such language is not contained in the statute. As noted in the discussion of the standard of review, this court generally will not look beyond the plain language of the statute and, in the event of ambiguous statutory language, will strictly construe the statute in favor of the accused. The plain language of the statute allows the district court to exercise discretion in departing from the sentencing minimum pursuant to K.S.A. 21-4719.
In 2008, the legislature amended K.S.A. 21-4719(a) to include the following language:
"The sentencing judge shall not impose a downward dispositional departure sentence for any crime of extreme sexual violence, as defined in K.S.A. 21-4716, and amendments thereto. The sentencing judge shall not impose a downward durational departure sentence for any crime of extreme sexual violence, as defined in K.S.A. 21-4716, and amendments thereto, to less than 50% of the center of the range of the sentence for such crime." K.S.A.2008 Supp. 21-4719(a), (L.2008, ch. 183, sec.7).
*1282 This amendment became effective on July 1, 2008, and does not apply to Gracey, who committed the crime in 2006 and was sentenced in 2007. The decision of the legislature to amend the statute to prohibit downward dispositional departures lends further credence to the interpretation that the statute in effect at the time the offense was committed allowed dispositional departures. When the legislature revises an existing law, the court presumes that the legislature intended to change the law as it existed prior to the amendment. State v. McElroy, 281 Kan. 256, 263, 130 P.3d 100 (2006).
Once sentencing has shifted to the sentencing guidelines, nothing precludes the district court from granting a departure, either dispositional or durational. The decision whether to depart lies within the discretion of the sentencing court. See Ortega-Cadelan, 287 Kan. at 165, 194 P.3d 1195. Here, because the district court ruled as a matter of law that it could not consider a downward dispositional departure, this case must be reversed and remanded for resentencing allowing for the sentencing court's consideration of a dispositional as well as a durational departure.
Finally, the State contends that the district court imposed a sentence lower than the guidelines sentence and that the imposition of such a sentence was illegal. The State argues that the district court failed to find factors justifying a downward durational departure on the sentencing guidelines grid: departing below the grid sentence for a criminal history of H required the district court to give substantial and compelling reasons for granting such a departure.
Whether a sentence is illegal within the meaning of K.S.A. 22-3504 is a question of law over which an appellate court's review is unlimited. State v. Flores, 283 Kan. 380, 382, 153 P.3d 506 (2007).
K.S.A. 22-3504(1) states: "The court may correct an illegal sentence at any time." An illegal sentence, as contemplated by K.S.A. 22-3504(1), is a sentence imposed by a court without jurisdiction; a sentence that does not conform to the statutory provision, either in the character or the term of the punishment authorized; or a sentence that is ambiguous with respect to the time and manner in which it is to be served. State v. Davis, 283 Kan. 767, 769, 156 P.3d 665 (2007).
The district court pronounced from the bench a sentence of 55 months' imprisonment. The guidelines sentencing range for a severity level 3-H nondrug offense was 71-66-61 months; the range for a severity level 3-I nondrug offense was 61-59-55 months. K.S.A.2006 Supp. 21-4704(a). It appears the district court selected a low-end sentence for a criminal history of I, although the presentence investigation revealed a criminal history of H.
The district court stated its reason for the departure-the mental capacity of the defendant as set forth by the parties in the plea agreement. The reason articulated by the district court was consistent with the statutory grounds for downward durational departure set out in K.S.A.2006 Supp. 21-4643(d)(5). The imposition of the 55-month sentence pronounced from the bench was not an illegal sentence.
The court has not been asked to determine whether the same findings may be used as mitigating factors to justify a departure under K.S.A. 21-4643(d) and as the statutory grounds for departure from a guidelines sentence as set out in K.S.A. 21-4643(d)(5), and we make no such determination at this time. We affirm the district court in applying K.S.A.2006 Supp. 21-3504(c), but we reverse and remand the case for resentencing consistent with this opinion.
Affirmed in part, reversed in part, and remanded with directions.
McFARLAND, C.J., not participating.
STANDRIDGE, J., assigned.[1]
NOTES
[1]  REPORTER'S NOTE: Judge Melissa Taylor Standridge, of the Kansas Court of Appeals, was appointed to hear case No. 99,310 vice Chief Justice McFarland pursuant to the authority vested in the Supreme Court by K.S.A. 20-3002(c).
