Anthony C. Hankins appeals the district court’s denial of his motion to correct an illegal sentence. He asserts drat the district court incorrectly included in his criminal history an Oklahoma deferred sentence that was not actually a conviction. We affirm the rulings of the district court.
Factual and Procedural History
On July 2, 2010, Hankins, dressed for combat and wielding a rifle, burst into Saints Bar and Grill. He threatened to do bodily harm to his victims and robbed the business of around $1,500. The police stopped Hankins’ vehicle as he was making his getaway. However, before they could take Hankins into custody, he sped away. Hanldns then crashed his vehicle. The police arrested him and, amidst other evidence of the crime, found around $1,500 in *972cash in his vehicle. Saints had a security system that captured the robbeiy on video. The proprietor of Saints recognized the robber as being similar in appearance to the person he saw on the video security system burglarizing Saints a month before the robbery.
The State charged Hankins with four felonies. He attempted to negotiate a plea bargain that included some concessions for probation. When that failed, Hankins, contrary to the advice of his attorney, decided to plead guilty without benefit of a plea bargain. On March 25, 2011, Hankins pled guilty as charged to one count of aggravated robbeiy and two counts of aggravated assault for the offenses he committed on July 2, 2010, and one count of burglary for the offense of June 4,2010. The presentence investigation (PSI) report listed three prior convictions: (1) possession of a firearm on school property, an adult nonperson felony; (2) giving a worthless check, an adult nonperson misdemeanor; and (3) possession of stolen property, an adult nonperson misdemeanor. The felony conviction was from Oklahoma. The PSI suggested that Hankins’ criminal history score was G.
The district court sentenced Hankins on May 19, 2011. At the outset of the hearing, the district court recited tire possible sentences indicated in the PSI report for each count. For tire primary offense, aggravated robbeiy, a level 3 person felony, using a criminal histoiy score of G, the aggravated sentence was 77 months, the standard sentence was 72 months, and the mitigated sentence was 68 months. For the three additional offenses, each a level 7 felony, applying a criminal history score of I, the applicable grid box provided a sentence range of 13 months, 12 months, or 11 months. The district court pointed out that this was a “presumptive prison” case.
The district court asked if anyone disagreed or had anything to add to the suggested sentencing terms from tíre PSI. Hankins’ attorney stated that he did not disagree and had nothing to add to those findings. Hankins’ attorney next responded that he knew of no reason not to proceed with sentencing. The district court then heard Hankins’ comprehensive arguments for a dispositional departure to probation. Hankins’ attorney argued the following points: Hankins entered his pleas as charged, without litigation, *973and contrary to advice of counsel, in order to reduce the burden on the State and the witnesses; he had obtained a job and was doing well; he was not a disciplinary problem at the residential center; he was remorseful about his criminal conduct and took full responsibility for it; he used a BB gun rather than an actual firearm during tire robbery; and he had a son to support. Hankins’ attorney suggested that, if the court granted probation, it could put “an enormous sentence over his head.” As further evidence of Hankins’ commitment to minimize the State’s burden, his attorney stated:
“There was an issue about that conviction in Oklahoma, whether it had actually been dismissed or if it was part of a diversion or some juvenile issues. He didn’t want to challenge that either, Judge, and decided, I’ve been dealing with this, I want to go forward today. I think if the court takes all of that into consideration, along with everything that is been outlined in tire departure motion, there is enough, there is enough to find grounds for a departure in this case.”
Hankins himself made a lengthy, articulate argument for probation. He emphasized that his job allowed him to use his college education. He read supporting letters from fraternity brothers and others to the court. Hankins did not contradict his attorney’s waiver of a challenge to the Oklahoma item on the PSI.
The district court found that Hankins’ reasons to depart from the presumption of imprisonment were not substantial and compelling. It sentenced Hankins to a term of 68 months in prison, the mitigated sentence, on the aggravated robbery count, and 12 months in prison on each of the other counts, with the sentences ordered to run concurrently.
On June 2, 2011, Hankins’ filed his Notice of Appeal of the sentence, all judgments, and all adverse rulings entered by the district court. On October 27, 2011, because of the notice of voluntary dismissal filed by Hankins, this court dismissed that appeal.
On June 25, 2012, Hankins filed a pro se motion to correct an illegal sentence alleging that the Oklahoma conviction should not have been included in his criminal history. He argued that the case there was disposed of through a special Oklahoma process called “deferred sentencing” that did not result in a conviction. Through his attorney, Hankins filed a supplemental motion to correct an illegal sentence on October'16, 2012. The State filed its response *974to the motion on October 30, 2012. The State argued that Hankins waived his right to challenge tire criminal history by stipulating to its accuracy. It contended that the doctrine of invited error precluded the relief Plankins requested. The State also addressed the substance of Hankins’ criminal history argument. The State attached Hankins’ Plea of Guilty and Summary of Facts form and the Sentencing After Previous Plea of Guilty form from the Oklahoma case. It argued that Hankins pled guilty to the offense so, under Kansas law, it constituted a conviction. The parties argued these positions at the motion hearing October 31, 2012. Interestingly, Hankins did not testify. The district court took the matters under advisement.
By written order entered November 26, 2012, the district court denied Hankins’ motion. It found that Hankins had waived his right to challenge his criminal history because he stipulated to it in open court. Thus, he could not now complain about an error he had invited by the stipulation. Further, the district court found that Hankins made a strategic decision not to challenge his criminal history: “It is apparent that during sentencing the Defendant argued for leniency because he did not challenge his criminal history or add additional burdens to the prosecutor.” It also found that, even if the defendant were able to challenge his criminal histoiy score, he had failed to prove that it was incorrect. The district court stated that deferred sentence offenses from other states can be included in a defendant’s criminal history where, as here, the proceeding had established the defendant’s guilt but simply deferred the imposition of punishment. Hankins filed a timely notice of appeal.
Analysis
On appeal the parties offer the same arguments they made to the district court.
The court may correct an illegal sentence at any time. K.S.A. 22-3504(1). The question of whether a sentence is illegal is a question of law over which this court has unlimited review. State v. Trotter, 296 Kan. 898, 902, 295 P.3d 1039 (2013). A sentence is illegal if (1) it is imposed by a court without jurisdiction; (2) it does not *975conform to the applicable statutory provision, either in the character or the term of authorized punishment; or (3) it is ambiguous with respect to the time and manner in which it is to be served. 296 Kan. at 902.
Invited Error
Hankins essentially concedes that he stipulated to his criminal histoiy score at sentencing. He contends that his illegal sentence claim is not barred under die invited error doctrine. He argues that whether the disposition of his Oklahoma case should count as a conviction is one of law not subject to-the invited error doctrine. He also argues that he could not stipulate to an incorrect application of law.
Where the parties have not stipulated to the criminal history, the district court has the power to correct an error in determining criminal histoiy. State v. Russell, 36 Kan. App. 2d 396, 399, 138 P.3d 1289, rev. denied 282 Kan. 795 (2006). However, where a defendant invites error by stipulating to his or her criminal history, he or she generally cannot obtain a correction of the sentence under K.S.A. 22-3504. State v. Vandervort, 276 Kan. 164, 175-76, 72 P.3d 925 (2003); Neal v. State, 25 Kan. App. 2d 705, 706, 971 P.2d 748 (1998), rev. denied 266 Kan. 1109 (1999).
Hankins contends that State v. Donaldson, 35 Kan. App. 2d 540, 133 P.3d 154 (2006), makes the invited error doctrine inapplicable here. The Donaldson court stated: “The invited error rationale is not applicable when the erroneous information at the heart of a stipulation is within the knowledge of the court, the prosecutor, and defense counsel, but not the defendant.” 35 Kan. App. 2d at 543. However, the Donaldson court qualified that exception by basing it on its facts, stating: “[T]he stipulation at issue is not to the factual existence of his prior convictions but to the classification of those prior convictions. . . . [This] involves the application of law. As such, no party can properly stipulate to an incorrect application of tire law.” (Emphasis added.) 35 Kan. App. 2d at 543-44.
The first problem with Hankins’ argument is that he did stipulate to the factual existence of his prior conviction. He attempts to avoid that difficulty by arguing on appeal that he “does not challenge the *976existence of the Oklahoma case listed on his presentence investigation report but challenges the classification of the Oklahoma case as a conviction for the purpose of criminal history score.” However, the PSI does not list cases. It lists only convictions. Hankins is challenging the very inclusion of this item, not its classification.
Planltins has another problem in relying on a Donaldson exception to invited error. “[T]he invited error rationale is not applicable when the erroneous information at the heart of a stipulation is within the knowledge of the court, the prosecutor, and defense counsel, but not the defendant.” 35 Kan. App. 2d at 543. Here there is no evidentiary indication that anyone other than Hankins knew that the Oklahoma conviction was part of a deferred sentence proceeding. Hankins' attorney stated: “There was an issue about that conviction in Oklahoma, whether it had actually been dismissed or if it was part of a diversion or some juvenile issues. He didn’t want to challenge that either, Judge, and decided, I’ve been dealing with this, I want to go forward today.” This supports the inference drawn by the district court that Hankins was aware of a potential challenge to the accuracy of the criminal history but intentionally chose to forgo the challenge as part of his dispositional departure strategy.
This court has recently discussed the invited error doctrine in two cases where the defendant stipulated to his criminal history score and then challenged the same after sentencing. Relying on the holding in Donaldson, the court in State v. Mims, No. 103, 044, 2011 WL 4563068 (Kan. App. 2011) (unpublished opinion), rev. denied 294 Kan. 945 (May 21, 2012), stated:
“Generally, a criminal defendant who stipulates to a criminal history score cannot later challenge the factual basis used to classify a prior conviction (e.g., whether a burglary conviction should be classified as a person or nonperson felony . . .) or the factual basis used to determine the criminal history score (e.g., the existence of a prior conviction).” 2011 WL 4563068, at *4.
In State v. Madkins, No. 104, 350, 2011 WL 4031531 (Kan. App. 2011) (unpublished opinion), rev. denied 294 Kan. 945 (May 21, 2012), a panel of this court questioned the reasoning in the Donaldson holding:
*977“While a defendant may not bind a court by a stipulation to an incorrect application of the law, a defendant may bind him or herself. Bello, 289 Kan. at 94, where the issue was the applicability of the rape shield statute, is a case in point. Another example is the line of cases refusing to review a jury instruction where the complaining party had sought the instruction below. See State v. McCoy, 34 Kan. App. 2d 185, 189-90, 116 P.3d 48, rev. denied 280 Kan. 988 (2005) (citing cases).
“The invited error doctrine applies to errors of law because it is based on estoppel, not on the personal knowledge of the defendant. State v. McCarley, 38 Kan. App. 2d 165, 175-76, 166 P.3d 418 (2007), aff'd in part and rev’d in part 287 Kan. 167, 195 P.3d 230 (2008). The invited error doctrine therefore applies to criminal history scores, the legal aspect of such scores notwithstanding: ‘A criminal defendant who stipulates to an incorrect criminal history score cannot later complain on appeal of an illegal sentence based on that score.’ State v. Goeller, 276 Kan. 578, Syl. ¶ 6, 77 P.3d 1272 (2003),.... [Defendant’s] criminal history score is not properly before us.” 2011 WL 4031531, at *3.
There is no need for any additional analysis of the doctrine here. The facts in this case drive the decision on invited error. The district court found that Hankins chose to forgo a challenge to the Oklahoma item on his criminal history as part of his dispositional departure strategy. The statements made by Hankins’ attorney at sentencing link the decision not to challenge the history directly to the “grounds for a departure in this case.” The evidence indicates that Hankins himself dictated that strategy. Hankins’ attorney said that Hankins entered his pleas as charged contrary to counsel’s advice. The evidence also demonstrates that Hankins is educated, articulate, and not lacking in intelligence. He spoke well for himself at sentencing. At the first, failed, plea hearing he overrode the suggestions of his attorney and the court and made an impassioned argument for probation. The district court pointed out that Hank-ins was getting ahead of himself since he had not yet been found guilty. Then, at the actual plea hearing, Hankins spoke for himself in challenging the factual basis the State offered to support the burglary charge. He decided that he was guilty only after a lengthy discussion. He spoke well and at length at his sentencing. This all supports the inference that, had Hankins wanted to challenge the inclusion of the Oklahoma offense in his criminal history, he would have done so.
*978Hankins had the statutory opportunity, and obligation, to challenge his criminal histoxy at sentencing. If he had, the State would have had the burden of producing proof sufficient to establish the disputed conviction by a prepondei-ance of the evidence. K.S.A. 2010 Supp. 21-4715(c). He chose not to challenge his criminal histoxy at sentencing. The decision of the district couit, that the invited error doctrine bars Hankins from now complaining of the criminal histoxy score he chose not to challenge at sentencing, is supported by substantial competent evidence.
In his concurrence Judge Atcheson -sets out his many disagreements with our invited error analysis. We mention only one of those specifically although we, obviously, reject them all. We believe his construction of the language amended into K.S.A. 21-4715(c) in 2009 is far too expansive. It appears to us that the amendment simply shifts the burden of proof on criminal history from the State to a defendant who challenges, in a subsequent case, a criminal histoxy established in a prior case. We do not believe that this language also, in the process, legislatively negates the application of the doctrine of invited error when considering a defendant’s postsentencing challenge to a criminal history established in the same case. Such a construction also makes the first two sentences of K.S.A. 2010 Supp. 21-4715(c) surplusage. (“Upon receipt of tire criminal history worksheet prepared for the court, the offender shall immediately notify the district attorney and tire court with written notice of any error in the proposed criminal history worksheet. Such notice shall specify the exact nature of the alleged error.”) In construing statutory provisions, we should glean the legislative purpose and intent from the language used, give effect to that purpose and intent, refrain from adding something not readily found in it, and avoid a reading that makes another part of the statute surplusage. See State v. Gracey, 288 Kan. 252, 257, 200 P.3d 1275 (2009); State v. Van Hoet, 277 Kan. 815, 826-27, 89 P.3d 606 (2004).
Even if Hankins’ appeal was not barred, he still would not prevail. In light of Judge Atcheson’s disagreements and in the interests of judicial economy we will address Hankins’ argument on the merits.
*979 Hankins’ Oklahoma Guilty Plea Was Properly Scored as a Conviction
The documentary evidence confirms what Hankins belatedly claims: he received a deferred sentence in the Oklahoma case from 2000 listed in his criminal history. The State does not dispute this. Hankins then argues that, under Oklahoma law, that court never entered a judgment of guilt so it should not count as a conviction. He argues that it is akin to a Kansas diversion and not includable in his criminal history.
This issue involves a matter of statutory interpretation. Therefore this court’s scope of review is unlimited. State v. Vontress, 266 Kan. 248, 259, 970 P.2d 42 (1998).
Unlike Kansas, the Oklahoma Legislature has empowered its courts to determine whether to impose or defer the formal entry of judgment of guilt and sentence. The pertinent portions of the statute, Okla. Stat. tit. 22 § 991c (2011), on deferred sentences in effect at the time of Hankins’ plea provide:
“A. Upon a verdict or plea of guilty or upon a plea of nolo contendere, but before a judgment of guilt, tire court may, without entering a judgment of guilt and with the consent of tire defendant, defer further proceedings upon the specific conditions prescribed by the court not to exceed a ten-year period.
[[Image here]]
“C. Upon completion of tire conditions of the deferred judgment, and upon a finding by the court that the conditions have been met and all fines, fees, and monetary assessments have been paid as ordered, the defendant shall be discharged without a court judgment of guilt, and the court shall order the verdict or plea of guilty or plea of nolo contendere to be expunged from the record and the charge shall be dismissed with prejudice to any further action.
[[Image here]]
“E. Upon violation of any condition of the deferred judgment, the court may enter a judgment of guilt and proceed as provided in Section 991a of this title or may modify any condition imposed.”
Before an Oklahoma court can even defer a sentence, then, there must be court acceptance of a guilty verdict, guilty plea, or nolo contendere plea. The Oklahoma Plea of Guilty and Summary of Facts document produced by the State shows that Hankins pled guilty to a charge of possession of a firearm on school property. *980Hankins provided a written factual basis for the plea: “I had a rifle at the John Marshall baseball field.” At the end of the plea document the court entered these particular findings:
“The court finds as follows:
[[Image here]]
“C. The defendant’s plea(s) of guilty is/are knowingly and voluntarily entered and accepted by the court.
[[Image here]]
“F. The defendant is guilty as charged
Okla. Stat. tit. 22, § 991c(A) mandates these findings as a prerequisite to a deferred sentence. Hankins, his attorney, the prosecutor, and the judge signed the document on June 28, 2000.
The parties apparently proceeded directly from the plea to sentencing. The Sentencing After Previous Plea of Guilty document confirms that Hankins was given a deferred sentence for 2 years. During that period he would be “supervised” until his conditions had been met. Hankins’ sentencing document warned him that, if he violated his probation, “the sentencing date of a deferred sentence may be accelerated and judgment and sentence imposed . . . .” If the State proved a violation of probation under a deferred sentence the court could “accelerate” the sentence and remand the defendant to prison. “A hearing to accelerate a deferred sentence is not to establish criminal liability, as that has already been established by the trial at the time of the plea.” Beller v. State, 597 P.2d 338, 340 (Okla. Crim. 1979). Hankins’ deferred sentence expired on June 27,2002. His order dismissing that case and recalling the warrant was dated Januaiy 8, 2008.
Kansas does not permit an appeal from a conviction until the judgment is final. K.S.A. 2010 Supp. 22-3601(a). To have a final judgment in a criminal case, the defendant must be convicted and sentenced. State v. Howard, 44 Kan. App. 2d 508, 511, 238 P.3d 752 (2010). Generally Oklahoma also requires the same finality. Okla. Stat. tit. 22, § 1051(a) (2011) provides that “[a]n appeal to the Court of Criminal Appeals may be taken by the defendant, as a matter of right from any judgment against him, which shall be taken as herein provided . . .” and “all appeals taken from any *981conviction on a plea of guilty shall be taken by petition for writ of certiorari to the Court of Criminal Appeals” (Emphasis added.) Thus, under a strict construction of Oklahoma’s appeal statute, an aggrieved defendant could not appeal die terms of his deferred sentence terms because, by definition, the judgment was not final. In 1994, the Oklahoma Court of Criminal Appeals considered the resulting tension between the due process right to appeal and the lack of finality in a deferred sentence. In Gonseth v. State, 871 P.2d 51, 54 (Okla. Crim. 1994), the court resolved that tension:
“The statute governing appeals uses the term judgment’ when dealing with most matters. However, when dealing with the specific area of a guilty plea, it uses the word ‘conviction.’ 22 O.S. 1991, § 1051(a). We believe the Legislature used the word ‘conviction’ instead of ‘judgment’ in connection with guilty pleas for a reason. Even though the term is most often—and correctly—used in the strict legal sense as meaning a final judgment of the court, that is not the only definition available. This Court noted the term in its ordinary sense could he used to designate that particular state of a criminal prosecution, when a plea of guilty is entered in open court, or a verdict of guilty is returned by a jury. See Gilmore v. State, 3 Okl. Cr. 639, 640, 108 P. 416 (1910). Such a definition, while not widely used, is a plausible one which allows this Court to interpret § 1051 and § 991c in a manner consistent with our constitution. Under it, while a deferment is not a conviction in the sense final judgment is entered, it is a final order in the sense the court has the power to enforce its orders upon one who has entered a plea of guilty or nolo contendere in open court.
[[Image here]]
“Accordingly, we hold a petitioner can appeal from a trial court’s denial of a motion to withdraw a guilty plea even though the court deferred judgment and sentence. . .
[[Image here]]
“After an Order Deferring Imposition of Sentence is entered, a defendant who so wishes can appeal the terms of probation entered as a part of the court’s Order.” (Emphasis added.)
We note that Hankins’ sentencing form contains a notice of the right to appeal as mandated by Gonseth.
In Kansas our courts apply the definition of conviction that the Gonseth court said is “not widely used.” K.S.A. 2010 Supp. 21-3110(4) provides that “ ‘[cjonviction includes a judgment of guilt entered upon a plea of guilty.” The legislature’s use of the word “includes” means that things other than such a judgment of guilt can constitute a conviction. In State v. Holmes, 222 Kan. 212, 214, *982563 P.2d 480 (1977), our Supreme Court made it clear that a conviction occurs when guilt is determined, not when sentence is later imposed and the judgment becomes final. There the defendant appealed his conviction of possession of a firearm by a convicted felon, arguing that the statute did not apply to him. Before committing the firearm offense, he had pled nolo contendere to attempted aggravated robbeiy, but he had not yet been sentenced. Our Supreme Court answered the question of when a conviction occurred, stating: “It is clear to us that once tire statutory procedure has been complied with and the plea of guilty or nolo contendere has been accepted and a finding of guilty entered thereon, the defendant stands convicted of the offense.” 222 Kan. at 214. The court upheld the conviction, holding that “[t]o achieve the legislative purpose K.S.A. 21-4204(l)(b) should be held applicable following a conviction of a felony although sentence has not yet been imposed.” 222 Kan. at 215.
Our Supreme Court has referred to the jury’s verdict of guilt as a conviction for over a century. See, e.g., State v. Frazier, 54 Kan. 719, 39 P. 819 (1895) (“That he attempted to violate the person of this little girl appears perfectly clear from the evidence, and he has been convicted by two juries.”); State v. Holt, 298 Kan. 469, 313 P.3d 826 (2013) (“In 1994, Holt was convicted by a jury of more than 60 offenses, including two counts of first-degree murder that arose out of a series of burglaries and related offenses in Junction City, Kansas.”).
Our legislature refers to any determination of guilt as a conviction, whether by plea or verdict. For example, under the Kansas Sentencing Guidelines Act, K.S.A. 2010 Supp. 21-4714(a) provides: “The court shall order the preparation of the presentence investigation report by the court services officer as soon as possible after conviction of the defendant.” For another, K.S.A. 21-4716 concerns departure sentencing and refers to die offense for sentencing as “the current crime of conviction.” K.S.A. 22-3414(3) concerns jury instructions and provides, in part: “In cases where there is some evidence which would reasonably justify a conviction of some lesser included crime as provided in subsection (2) of K.S.A. 21-3107, and amendments thereto, die judge shall instruct *983the juiy as to the crime charged and any such lesser included crime.”
For a last example, tire Kansas capital murder statute provides in part:
“(a) If a defendant is charged with capital murder, the county or district attorney shall file written notice if such attorney intends, upon conviction of the defendant, to request a separate sentencing proceeding to determine whether the defendant should be sentenced to death. . . .
“(b) Except as provided in K.S.A. 21-4622 and 21-4623, and amendments thereto, upon conviction of a defendant of capital murder, the court, upon motion of the county or district attorney, shall conduct a separate sentencing proceeding to determine whedier the defendant shall be sentenced to death.” (Emphasis added.) K.S.A. 2010 Supp. 21-4624.
In Kansas a conviction occurs when the court finds or accepts a finding of guilt. The final judgment and sentencing then follow.
Kansas law applies when determining whether Hankins’ Oklahoma guilty plea and deferred sentence are the equivalent of a conviction for criminal history purposes. That is true even if the foreign state does not treat tire disposition as a conviction. See State v. Pollard, 273 Kan. 706, 712, 44 P.3d 1261 (2002) (a Missouri suspended imposition of a felony sentence properly served as the predicate conviction for a subsequent Kansas charge of criminal possession of a firearm). See also State v. Siesener, 35 Kan. App. 2d 649, 137 P.3d 498 (2005) (criminal history properly included a Missouri offense since defendant plead guilty, although he received a suspended imposition of sentence); State v. Macias, 30 Kan. App. 2d 79, 39 P.3d 85 (2002) (criminal history properly included a deferred sentence under Texas law where defendant’s factual guilt was established in the foreign state); State v. Hodgden, 29 Kan. App. 2d 36, Syl. ¶ 6, 25 P.3d 138 (2001) (criminal history properly included a judgment of conviction later set aside under Alaska law), rev. denied 271 Kan 1040 (2001); State v. Presha, 27 Kan. App. 2d 645, 649, 8 P.3d 14 (2000) (criminal history properly included a Florida juvenile adjudication that, had it occurred in Kansas, was scorable). “What matters ... is whether the foreign state concluded the defendant did the crime[], not whether he or she ultimately had to do the time.” Macias, 30 Kan. App. 2d at 83.
*984The court’s analysis in Macias is relevant here. That court held that a Texas deferred adjudication counted as a prior conviction under Kansas law. 30 Kan. App. 2d at 83. Similar to the Oklahoma statute, Texas law empowered a judge who had accepted a guilty or nolo contendere plea to defer further proceedings, without a final adjudication of guilt and sentence, and place the defendant on community supervision. If the defendant violated the terms of supervision the defendant was arrested. The court would then hold a hearing to determine whether the supervision violation occurred. If so, the court “proceeds with an adjudication of guilt on die original charge,” and sentencing was conducted “as if the adjudication of guilt had not been deferred.” Tex. Code Crim. Proc. Ann. § 42.12(5)(b) (2006). If a defendant successfully completes community supervision, the judge must dismiss the proceedings against the defendant and discharge him or her. The Texas statute allows consideration of a deferred adjudication of guilt when determining the penalty for the conviction of a later offense. Tex. Code Crim. Proc. Ann. § 42.12(5)(c)(l).
The Macias court found it significant that the Texas procedure only allowed adjudication after the entry of a guilty or nolo con-tendere plea, or after a trial where guilt was demonstrated. Similarly, the Oklahoma statute only allows for a deferred sentence after entry of a guilty verdict, guilty plea, or nolo contendere plea. Okla. Stat. tit. 22, § 991c(A) (2011). The Macias court found that, under the Texas procedure, Macias’ guilt was demonstrated to the satisfaction of the Texas court, and nothing but formal adjudication remained. That court also noted that the Kansas Sentencing Guidelines seek to inhibit a defendant’s refusal to renounce criminal behavior by taking all prior established criminal behavior into consideration for sentencing. It does not “matter what lenience another state may wish to show, once we are satisfied that a defendant’s actual guilt was established in a foreign state, that prior crime will count in Kansas.” Macias, 30 Kan. App. 2d at 83.
K.S.A. 21-4711(e) requires that an offender’s out-of-state convictions and juvenile adjudications be used in classifying the offender’s criminal history. K.S.A. 2010 Supp. 21-4710(d)(2) requires *985that an offenders criminal history classification contain all prior adult felony convictions, including expungements.
Here, Hankins’ Oklahoma case was properly included in his criminal history even though Oklahoma eventually dismissed the case and expunged that record. He pled guilty, he gave the factual basis for that plea, the court accepted his plea, and the court found him guilty. Under Better, Hankins’ plea established his guilt (“criminal liability”) under Oklahoma law. Had the Oklahoma court subsequently found that Hankins violated the terms of the deferment the court could have imposed sentence as if it had not been deferred. Moreover, as the Gonseth court decided, even Oklahoma law treats a deferred sentence as a “conviction” such that the defendant has the right to appeal the terms of the deferred sentence.
Hankins’ attempt to liken his Oklahoma deferred sentence to a Kansas diversion does not help him. The differences are too substantial. Here the State determines who goes into diversion, not the court. The defendant does not plead guilty as a precondition to a grant of diversion.
Hankins pled guilty in Oklahoma. His factual guilt was established there. The ultimate disposition of the case there does not control how Kansas treats the disposition when determining criminal history on a subsequent offense. Even if Hankins had properly preserved this issue for appeal, we still affirm the district court because it was correct in its conclusion that Hankins’ Oklahoma deferred sentence constitutes a conviction for purposes of determining his criminal histoiy under Kansas law.
Affirmed.
[[Image here]]