
280 Kan. 241 (2005)
STATE OF KANSAS, Appellee,
v.
RICHARD H. CHAMBERLAIN, Appellant.
No. 91,007
Supreme Court of Kansas.
Opinion filed September 30, 2005.
*243 R. Kent Sellers, of Lathrop & Gage, L.C., of Kansas City, Missouri, argued the cause, and Robb Edmonds, of Bath & Edmonds, P.A., of Overland Park, Kansas, was with him on the briefs for appellant.
Steven J. Obermeier, assistant district attorney, argued the cause, and Paul J. Morrison, district attorney, and Phill Kline, attorney general, were with him on the briefs for appellee.
Randall J. Forbes, of Frieden, Haynes & Forbes, of Topeka, Kansas, was on the brief for amicus curiae Kansas Association of Criminal Defense Lawyers.
The opinion of the court was delivered by
DAVIS, J.
Richard H. Chamberlain petitions this court for review of the Court of Appeals' decision in State v. Chamberlain, No. 91,007, unpublished opinion filed September 3, 2004. The Court *244 of Appeals affirmed his conviction and sentence for a third driving under the influence (DUI) offense, an unclassified nonperson felony under K.S.A. 8-1567(f) and (l)(3). He contends that the use of his prior diversion agreements to enhance his sentence under 8-1567 violated the Ex Post Facto and Contract Clauses of the United States Constitution. We granted the defendant's petition for review under K.S.A. 20-3018(b), and we affirm his conviction and sentence.
On March 22, 2002, the defendant was charged with DUI after two prior convictions for conduct committed on March 1, 2002. The defendant had previously entered into two DUI diversion agreements on February 27, 1986, and September 11, 2001.
The defendant moved to dismiss or, in the alternative, deny the State's use of a prior diversion agreement to enhance his sentence or classify his crime. He argued that the 2001 amendment to 8-1567, see L. 2001, ch. 200, sec. 14, which classified his 1986 diversion as a prior conviction, was an unconstitutional violation of the Ex Post Facto and Contract Clauses of the United States Constitution. See U.S. Const. Art. I, § § 9, 10. The trial court denied his motion and on stipulated facts found the defendant guilty of DUI in violation of K.S.A. 8-1567. The defendant was sentenced to 12 months of probation with an underlying prison term of 12 months, commencing with 7 days in custody followed by 83 days of house arrest.
In addressing the defendant's ex post facto sentencing argument, the Court of Appeals, like the trial court, relied upon City of Norton v. Hurt, 275 Kan. 521, 66 P.3d 870 (2003), wherein this court rejected this same argument based upon an enhanced sentence after a second DUI municipal offense. In rejecting his Contract Clause argument, the Court of Appeals found that there were no express limitations on future use and no provisions incorporating current statutes into the 1986 diversion agreement, making it impossible to determine the extent to which the defendant relied on such limitations as a factor in entering into the diversion agreement. The Court of Appeals then concluded that even if the 1986 statute, K.S.A. 1986 Supp. 8-1567(j)(3), would be read into the diversion agreement, the defendant still failed to show that his *245 contract rights were impaired because the DUI statute was still based upon his current conviction, not past convictions, and the law placed no limitations on any prior diversion agreement.

Diversions Under Kansas Law
Resolution of the constitutional issues raised in this case first requires a brief review of diversions under Kansas law. In Kansas, after a complaint charging a defendant with the commission of a crime has been filed but before a conviction, the State may propose a diversion agreement. K.S.A. 22-2907(1); see K.S.A. 12-4414(a). A diversion agreement is "the specification of formal terms and conditions which a defendant must fulfill in order to have the charges against him or her dismissed." K.S.A. 22-2906(4); see K.S.A. 12-4413(d). "No defendant shall be required to enter any plea to a criminal charge as a condition for diversion." K.S.A. 22-2910; see K.S.A. 12-4417. "[E]ntering into a diversion agreement pursuant to K.S.A. 12-4413 et seq. or 22-2906 et seq., and amendments thereto, shall not constitute plea bargaining." K.S.A. 2004 Supp. 8-1567(p). Diversion is, therefore, a means to avoid a judgment of criminal guilt. Petty v. City of El Dorado, 270 Kan. 847, 852, 19 P.3d 167 (2001); see K.S.A. 22-2906(3) and (4); K.S.A. 12-4413(c) and (d).
"If the defendant has fulfilled the terms of the diversion agreement, the district court shall dismiss with prejudice the criminal charges filed against the defendant." K.S.A. 2004 Supp. 22-2911(b); see K.S.A. 12-4416(a). The city, county, or district attorney shall forward to the Kansas Bureau of Investigation and the Kansas Department of Revenue Division of Vehicles a record of the fact that a defendant did or did not fulfill the terms of a diversion agreement. The record shall be made available upon request to any county, district or city attorney, or court. K.S.A. 2004 Supp. 22-2911(c) and (d); see K.S.A. 12-4412 and K.S.A. 12-4416(e). Diversions are not counted as part of a defendant's criminal history. State v. Macias, 30 Kan. App. 2d 79, 81, 39 P.3d 85, rev. denied 273 Kan. 1038 (2002). Kansas courts have applied contract principles when interpreting diversion agreements. See Petty, 270 Kan. at 853-54; see also State v. Boley, 279 Kan. 989, Syl. ¶ 1, 113 P.3d *246 248 (2005) (applying fundamental contract principles to plea agreements).

Ex Post Facto
From the time of the 1986 diversion agreement until 2001, 8-1567 provided that only DUI convictions or diversion agreements "occurring in the immediately preceding five years, including prior to the effective date of this act, shall be taken into account" for purposes of determining the classification level of offense under the DUI statute. See K.S.A. 1986 Supp. 8-1567(j)(1), (3); K.S.A. 8-1567(l)(1), (3) (Furse 1991). As amended in 2001, see L. 2001, ch. 200, sec.14, any DUI conviction including "entering into a diversion agreement" and "occurring during a person's lifetime shall be taken into account when determining the sentence to be imposed for a first, second, third, fourth, or subsequent offender." K.S.A. 8-1567(l)(1), (3); now K.S.A. 2004 Supp. 8-1567(m)(1), (3). The defendant argues that K.S.A. 8-1567 is an unconstitutional ex post facto law as applied to his case.
Our standard of review involving the constitutionality of a statute is well established:
"The constitutionality of a statute is presumed, all doubts must be resolved in favor of its validity, and before the statute may be stricken it must clearly appear the statute violates the constitution. In determining constitutionality, it is the court's duty to uphold a statute under attack rather than defeat it, and if there is any reasonable way to construe the statute as constitutionally valid, that should be done. A challenge to the constitutionality of a statute is a question of law and this court has unlimited review." State v. Martis, 277 Kan. 267, 298, 83 P.3d 1216 (2004).
"Article I, Section 10, of the United States Constitution provides: `No State shall . . . pass any . . . ex post facto Law.'" State v. Myers, 260 Kan. 669, 676, 923 P.2d 1024 (1996), cert. denied 521 U.S. 1118 (1997). The United States Supreme Court has set forth four categories of ex post facto violations:
"`1st. Every law that makes an action done before the passing of the law, and which was innocent when done, criminal; and punishes such action. 2d. Every law that aggravates a crime, or makes it greater than it was, when committed. 3d. Every law that changes the punishment, and inflicts a greater punishment, than the law annexed to the crime, when committed. 4th. Every law that alters the *247 legal rules of evidence, and receives less, or different, testimony, than the law required at the time of the commission of the offence, in order to convict the offender. All these, and similar laws, are manifestly unjust and oppressive.'" Stogner v. California, 539 U.S. 607, 612, 156 L. Ed. 2d 544, 123 S. Ct. 2446 (2003) (quoting Calder v. Bull, 3 U.S. [3 Dall.] 386, 390-91, 1 L. Ed. 648 [1798]).
See Myers, 260 Kan. at 676.
The following two elements must be present before a law will be considered an ex post facto violation: "(1) The law must be retrospective, applying to events occurring before its enactment, and (2) it must alter the definition of criminal conduct or increase the penalty by which a crime is punishable." Anderson v. Bruce, 274 Kan. 37, 43, 50 P.3d 1 (2002). In other words: "The law must be retrospective, applying to events occurring before its enactment, and it must disadvantage the offender affected by it." Stansbury v. Hannigan, 265 Kan. 404, 412, 960 P.2d 227, cert. denied 525 U.S. 1060 (1998) (citing Weaver v. Graham, 450 U.S. 24, 29, 67 L. Ed. 2d 17, 101 S. Ct. 960 [1981]). The critical question in evaluating an ex post facto claim is whether the law changes the legal consequences of acts completed before its effective date. Weaver, 450 U.S. at 31; State v. Armbrust, 274 Kan. 1089, 1093, 59 P.3d 1000 (2002).
This appeal focuses on the inclusion of the defendant's 1986 diversion agreement, as his subsequent 2002 diversion occurred after the 2001 amendment. The defendant argues that the amended DUI statute retroactively changes the legal consequences of his 1986 diversion contract by making it a conviction for life instead of subject to a 5-year "immediately preceding" decay period under prior law. But see State v. Sedillos, 279 Kan. 777, Syl. ¶ ¶ 6 and 9, 112 P.3d 854 (2005). He argues that he fulfilled the terms of his 1986 diversion contract, that a full 5 years passed under the previous law before enactment of the 2001 amendment, and that the use of his diversion agreement for his current DUI offense violates the Ex Post Facto Clause. The defendant further argues that the Court of Appeals failed to consider the different categories of ex post facto violations and ignored Stogner because it felt constrained by this court's decision in Hurt.
*248 Hurt was sentenced under a city ordinance modeled after the 2001 amendment to K.S.A. 8-1567 as a second-time DUI offender because he had a previous DUI diversion in 1995. Hurt argued that once the 5-year decay period ran on his first DUI diversion, he no longer had a "conviction" on his record and he had a vested right in that status which could not be changed by a subsequent act of the legislature or another governmental subdivision.
This court in Hurt noted that a function of the Ex Post Facto Clause is to bar enactments which, by retroactive operation, increase the punishment for a crime after its commission. The court cited Anderson, 274 Kan. at 42-43, 47-48, where this court found no ex post facto violation in denying a prisoner credit for time spent on parole for an earlier offense, even though the law at the time of the offense would have provided for such credit, where the amended statute applied only to new offenses committed after the statute's effective date. 275 Kan. at 522-23.
The Hurt court also cited State v. Campbell, 9 Kan. App. 2d 474, 477, 681 P.2d 679 (1984), where the Court of Appeals rejected the argument that enhanced punishment for subsequent DUI convictions was an ex post facto law because 8-1567 did not impose mandatory penalties for repeat DUI offenses when the first DUI offense was committed. The court also cited several cases from other jurisdictions which have upheld amendments to their DUI statutes which increased the decay period for determining the classification level of punishment before concluding:
"Enhancement statutes, like sentencing guidelines or recidivist statutes, are common in state criminal laws and do not change the penalty imposed for the earlier conviction. [Citation omitted.] The amended [City of] Norton ordinance did not operate retroactively to increase the penalty for Hurt's prior DUI offense. Instead, the amended ordinance became effective prior to Hurt's second DUI violation and increased the penalty for the second violation only. Because the amendment does not affect Hurt's actions prior to its effective date, it is not an ex post facto law." Hurt, 275 Kan. at 524.
The State correctly points out that Hurt is analogous to this case because: (1) Both defendants had a DUI diversion that had decayed under pre-2001 versions of the DUI statute, (2) both defendants committed a subsequent DUI after the 2001 amendment *249 which included the formerly decayed DUI diversions as convictions, and (3) the 2001 amendment did not operate retroactively to increase the penalty for the prior offense. The defendant argues that Hurt does not control the result in this case for three reasons: (1) Hurt addressed a different ex post facto argument, i.e., whether the punishment for a prior act had been retroactively enhanced, than the arguments raised by the defendant in this case; (2) Hurt limited its analysis and holding to prior convictions rather than diversion agreements; and (3) Hurt relied upon "decay" cases from other jurisdictions which did not involve diversion agreements.
The defendant's second and third points of distinction are without merit. The prior conviction in Hurt, as well as in this case, was a DUI diversion. In Hurt, similar arguments to those raised in this case were made, viz., that a defendant had a vested right in his or her status after the 5-year decay period had expired which could not later be recharacterized as a conviction. Further, although Hurt relied upon other cases which involved prior convictions rather than diversions, under both the 1986 statute and the 2001 statute for purposes of sentencing enhancement, a conviction included both being convicted of a violation of 8-1567 or receiving a DUI diversion. See K.S.A. 1986 Supp. 8-1567(j)(1); K.S.A. 8-1567(l)(1); K.S.A. 2004 Supp. 8-1567(m)(1). See also State v. Priest, 239 Kan. 681, 684, 722 P.2d 576 (1986), overruled on other grounds by State v. Delacruz, 258 Kan. 129, 133-36, 899 P.2d 1042 (1995) (a successfully completed DUI diversion agreement has the same effect as a conviction for DUI when a sentence is enhanced).
Although the defendant focuses on the point that the 1986 diversion was not an adjudication of guilt, in State v. Clevenger, 235 Kan. 864, 867, 683 P.2d 1272 (1984), this court has previously found that consideration of a prior diversion agreement for sentencing enhancement under 8-1567 did not violate due process even though the defendant's guilt or innocence was not adjudicated. The court reasoned that "[t]he nature of diversion in the context of DUI violations is particularly indicative of the diversion's conviction-like nature," where a defendant stipulates to the facts constituting the offense and voluntarily waives all constitutional rights to a trial by voluntarily choosing to enter a diversionary program. *250 235 Kan. at 867-68. "The important fact is that an offense of driving while under the influence has occurred twice. The fact the defendant was lucky enough to be allowed diversion in the first case should not preclude the enhancement of the sentence for a second offense." 235 Kan. at 867; see also Commonwealth v. Murphy, 389 Mass. 316, 451 N.E.2d 95 (1983) (No distinction of constitutional dimension between a prior DUI conviction and a previous assignment to an alcohol education program after admission of sufficient facts which would have warranted a finding of guilt for purposes of sentencing enhancement under amended DUI statute.). Hurt's reliance upon cases which involve prior convictions rather than diversion agreements is a distinction without a difference. See Sedillos, 279 Kan. 777, Syl. ¶ ¶ 6 and 9.
The defendant's more persuasive point of distinction is that Hurt did not address the same categories of ex post facto violations raised in this case. This argument is tied to his claim that the Court of Appeals, in following Hurt, erroneously focused upon a category three violation, namely whether the 2001 amendment increased the punishment attached to the 1986 diversion agreement, when his contentions revolve around category one and category two violations. See Stogner, 539 U.S. at 612 (four categories of ex post facto violations).
The defendant argues that a category one violation ("[e]very law that makes an action done before the passing of the law, and which was innocent when done, criminal; and punishes such action") is present in this case because the State in 2001 retroactively defined a lawful actthe entry into a 1986 contract (diversion agreement)as a criminal conviction. He argues the legislature attempted to retrospectively criminalize the making of a lawful contract by treating it as a conviction despite well-settled law that it is not a conviction, guilty plea, or judgment. He contends that the 2001 amendment did not merely legislate increased penalties for the commission of future acts by persons with a preexisting status but that it changed the preexisting status by criminalizing the status of being a party to a diversion agreement, even though the contract had been fully performed for over a decade. Additionally, he argues that absent this legislative fiat, no basis exists for labeling the defendant *251 as guilty of such a crime because the 1986 prosecution was dismissed in his favor.
It is unclear whether the defendant is arguing that the actual act of entering into the diversion agreement is now criminal or that the diversion itself is now considered a criminal conviction under the amended statute. Both arguments are without merit. The amended statute does not make the act of entering into a diversion agreement in 1986 criminal, and the amended statute provides no authority to prosecute the defendant for entering into this prior diversion agreement. Likewise, the amended statute has not transformed the defendant's 1986 DUI diversion into a criminal conviction. His 1986 diversion has not been revoked, and he does not now have a 1986 DUI conviction listed in his criminal history. His records continue to reflect a 1986 DUI diversion which is not counted in his criminal history.
The defendant overlooks the fact that "`[t]he term "conviction" has different meanings in different statutory contexts.'" Clevenger, 235 Kan. at 867 (quoting Walker v. Dist. Ct., 199 Colo. 128, 132, 606 P.2d 70 [1980]). The amended statute only characterizes the diversion agreement as a conviction for sentencing enhancement purposes. The enhancement relates to a new DUI conviction committed after 8-1567 was amended in 2001. The amended statute does not make an action done before the passing of the law, which was innocent when done, criminal, nor does it punish that action. See State v. Hall, 119 N.M. 707, 709-10, 895 P.2d 229 (N.M. App. 1995), (No ex post facto violation arose in using a defendant's prior DUI convictions under the former DUI statute to enhance conviction under the amended statutedefendant's conduct under the former DUI statute was criminal and remains criminal under the new DUI statute.).
In this defendant's case, his 1986 and 2001 diversion agreements were considered convictions for sentencing enhancement under K.S.A. 8-1567(f) and (l)(3). The 2001 amendment authorizing treatment of his diversion agreements to be considered as prior convictions for enhancement of his current DUI conviction did not retroactively define the diversion as a criminal conviction; it simply changed the time period during which a diversion agreement could *252 be counted as a conviction for enhanced sentencing under the current DUI conviction. See L. 2001, ch. 200, sec. 14. As the State points out, the legal consequences of the defendant's actions in this casethat his prior DUI diversion would enhance the penalty for his current offenseaffected his current offense and had no effect on his 1986 diversion. Contrary to the defendant's contention, there was no category one ex post facto violation or retroactive redefinition of the defendant's criminal conduct.
Alternatively, the defendant claims that if the diversion agreement is treated as a conviction, the law then in effect established that the so-called conviction would endure for only 5 years and granted him amnesty from any future consequences after those 5 years elapsed without incident. According to the defendant, a category two ex post facto violation occurred because the defendant's 1986 DUI diversion was made greater than it was when entered into by the defendant. In other words, a category two violation occurred because the 2001 amendment aggravated his 1986 diversion agreement by revoking the 5-year decay period and redefining the diversion agreement as a conviction, exposing the defendant to the risk of adverse criminal consequences for life.
The defendant relies primarily upon Stogner, 539 U.S. 607, both in arguing that a category two ex post facto violation occurred in this case and in distinguishing this case from Hurt. In Stogner, the United States Supreme Court held that California's new criminal statute of limitations permitting prosecution for sex-related child abuse after the prior limitations period had expired violated the Ex Post Facto Clause. The Court concluded that the California law fell under the second category of ex post facto laws "`([e]very law that aggravates a crime, or makes it greater than it was, when committed,'" so long as the category was understood as referring to a statute that inflicts punishments where the party was not by law subject to any punishment. 539 U.S. at 612-13. The Court reasoned in part that the California law enacted after the previous statute of limitations "subjects an individual such as Stogner to prosecution long after the State has, in effect, granted an amnesty, telling him that he is `at liberty to return to his country . . . and that from henceforth he may cease to preserve the proofs of his innocence.'" *253 539 U.S. at 632 (quoting Wharton, Criminal Pleading and Practice § 316, p. 210).
Unlike this case and Hurt, California sought to prosecute a defendant for an offense under a new law that extended the statute of limitations after the prior statute of limitations had expired. In other words, the defendant in Stogner was no longer criminally liable for prosecution of the offense because the statute of limitations had run. The legislature then, by new law, extended the statute of limitations thereby subjecting the defendant to prosecution for the offense under the new law. In contrast, Hurt and defendant Chamberlain were being prosecuted for a new offense committed after the statute was amended. The use of their prior diversions under K.S.A. 8-1567(l)(3), see K.S.A. 2004 Supp. 8-1567(m)(3), does not establish criminal liability or punishment where there is none, but rather:
"`A showing of prior convictions goes only to the question of [a] defendant's status. The prior conviction or convictions gives the defendant a classification, and the statute prescribes sequentially increased punishment for repeat offenders. A repeating offender is not punished for the prior offense or offenses, but the Legislature has declared that repeated violations justify the enhanced penalty.'" Campbell, 9 Kan. App. 2d at 477 (quoting State v. Jones, 214 Kan. 568, 570, 521 P.2d 278 [1974]).
See State v. LaMunyon, 259 Kan. 54, 66, 911 P.2d 151 (1996); State v. Gordon, No. 89,744, unpublished opinion filed July 2, 2004, rev. denied 278 Kan. 849 (2004).
Unlike the factual situation in Stogner, the defendant is not claiming amnesty due to an expired statute of limitations; rather, he is seeking amnesty from having his prior diversion used to determine the classification status for his current conviction because the 5-year decay period had expired. This argument assumes that K.S.A. 1986 Supp. 8-1567(j)(3) provided the defendant with immunity from having his prior convictions counted after the 5-year period expired, which, as discussed below, is a faulty assumption. The 5-year decay provision incorporated into the diversion agreement referred only to the classification of the 1986 DUI offense and not to future offenses committed under amended statute, and an immunity from a change in the general rules of law will not *254 ordinarily be implied as an unexpressed term of an express contract. See State v. Shelinbarger, 33 Kan. App. 2d 678, 681, 108 P.3d 445, rev. denied 280 Kan. ___ (2005) (quoting Chicago & Alton R.R. v. Tranbarger, 238 U.S. 67, 76, 59 L. Ed. 1204, 35 S. Ct. 678 [1915]).
The defendant's reliance upon State v. Anderson, 12 Kan. App. 2d 342, 744 P.2d 143 (1987), in support of his amnesty argument is misplaced. Anderson involved an ex post facto violation in amended legislation that withdrew the opportunity for expungement which existed at the time of conviction. Anderson is distinguishable from this case in that the amended statute applied only to Anderson's prior conviction and involved no subsequent offense after the statute was amended. Similarly, this court found that an amended statute which deprived an inmate of good time credits already earned for the refusal to participate in a sexual abuse treatment program not required at the time of the offense was an ex post facto violation, distinguishing itself from other cases where a defendant was being punished for a subsequent offense. Kesterson v. State, 276 Kan. 732, 734-35, 79 P.3d 1074 (2003).
In this case, the K.S.A. 8-1567(l)(3) (now K.S.A. 2004 Supp. 8-1567[m] [3]) inclusion of lifetime convictions for sentence enhancement relates only to the defendant's classification status at the time he committed the 2002 offense and has no retrospective effect on the 1986 diversion. No amnesty from the use of prior diversions was granted by the 1986 statute, and the 1986 diversion was not retroactively defined as a criminal conviction. As such, the defendant is unable to establish that the amended statute aggravated the 1986 diversion or made it greater than it was when committed. Thus, no category two ex post facto violation occurred in this case. See State v. Marshall, 81 P.3d 775 (Utah App. 2003) (Enhancement of current DUI conviction under amended statute which punished based on prior DUI convictions did not retroactively aggravate the crime [category two] nor inflict greater punishment than that attached to those crimes when they were committed [category three] where the amended statute punished only for the current offense, albeit more seriously than if the same offense would have been committed at an earlier point in time).
*255 The defendant has failed to establish either a category one or category two ex post facto violation in this case and fails to demonstrate that Stogner overrules this court's decision in Hurt. We conclude that the Court of Appeals correctly decided that Hurt controls this issue. Hurt counsels that the 2001 amendment to 8-1567 in this case did not operate retroactively to increase the penalty for the defendant's prior 1986 DUI diversion, nor did it redefine his 1986 diversion as a criminal conviction. Instead, the amended statute became effective prior to the defendant's 2002 DUI violation and only increased the penalty for his 2002 DUI conviction. Because the amendment does not affect the defendant's actions prior to its effective date, the amended DUI statue is not an ex post facto law.

Impairment of Contract Rights
The defendant argues that K.S.A. 8-1567(l)(3) works as an unconstitutional impairment of his contractual rights under his 1986 diversion agreement. The determination of whether a statute violates the Constitution is a question of law over which we have unlimited de novo review. Mudd v. Neosho Memorial Regional Med. Center, 275 Kan. 187, 197, 62 P.3d 236 (2003).
Article I, § 10 of the United States Constitution provides: "No State shall . . . pass any . . . Law impairing the Obligation of Contracts . . . ." The Contract Clause of the United States Constitution was thus adopted to prohibit the States from enacting laws which impair the obligation of contracts. "This prohibition has been construed as preventing the States from passing any statute which will alleviate the commitment of one party to a contract or which interferes with the enforcement of the contract." Federal Land Bank of Wichita v. Bott, 240 Kan. 624, 629, 732 P.2d 710 (1987).
Although the Contract Clause appears facially absolute, it must be considered in conjunction with the reserved power of the State to protect the vital interests of the community. 240 Kan. at 632.
"The test for determining whether a state law violates the Contract Clause of the United States Constitution is whether: (1) The state law has, in fact, operated as a substantial impairment of a contractual relationship; (2) whether there is a *256 significant and legitimate public purpose behind the legislation; and (3) whether the adjustment of the contracting parties' rights and responsibilities is based upon reasonable conditions and is of a character appropriate to the public purpose justifying the legislation's adoption." 240 Kan. 624, Syl. ¶ 4.
The Court of Appeals concluded that the 2001 amendment affected only the defendant's current 2002 DUI offense and the amendment did not impair and had no effect on the contract rights of the defendant's 1986 diversion agreement:
"Here, the diversion agreement is silent, with no express limitations on future use and no provision incorporating current statutes in the agreement. Absent such an express limitation, there is no way for this court to determine the extent to which Chamberlain relied on such a limitation as a factor in entering into the diversion agreement. Nevertheless, it is unlikely that Chamberlain would have refused to enter into the diversion agreement had he known that such a limitation might not be read into the contract, since the legislature was free to change the statutes at any time.
"Even if this court would choose to read the 1986 statute into the diversion agreement, Chamberlain still fails to show how that his contract rights were impaired. The DUI statute, past or present, is still based upon the current conviction, not past convictions. The statute simply provides a guideline for determining if the current conviction should be treated as a first, second, third, or subsequent conviction for sentencing. The statute places no limitations on any prior diversion agreement."
The defendant argues the Court of Appeals erred in rejecting his claim of impairment of contract because K.S.A. 8-1567(l)(1) and (3), which treat a diversion agreement as a conviction for life, destroyed his contractual right to a dismissal with prejudice of the 1986 DUI charge by redefining it as the equivalent to an adjudication of guilty. He contends that his rights under the 1986 diversion agreement have been "impaired to the point of obliteration" by K.S.A. 8-1567.
In its amicus brief, the Kansas Association of Criminal Defense Lawyers contends the Court of Appeals ignored the two leading Contract Clause cases, Allied Structural Steel Co. v. Spannaus, 438 U.S. 234, 57 L. Ed. 2d 727, 98 S. Ct. 2716 reh. denied 439 U.S. 886 (1978) and Home Bldg & L. Assn. v. Blaisdell, 290 U.S. 398, 78 L. Ed. 413, 54 S. Ct. 231 (1934), which confirm that the Contract Clause is a viable and real constitutional limitation on state *257 legislatures, even in the exercise of police power. The amicus argues that all of the elements of the Bott test are met, primarily focusing upon the third prong of the test. However, the amicus fails to recognize that the Bott test, cited by the Court of Appeals, in this case specifically takes into account "the factors applied in Blaisdell and Spannaus as well as the overriding general principle that the reservation of the State's police power must be read into all contracts." Bott, 240 Kan. at 633-34 (citing Energy Reserves Group v. Kansas Power & Light, 459 U.S. 400, 411-12, 74 L. Ed. 2d 569, 103 S. Ct. 697 [1983]).
Moreover, two recent Court of Appeals cases have recognized this limitation on the exercise of police power and still concluded that the 2001 amendment's inclusion of lifetime diversion agreements did not violate the Contract Clause because the defendants had not met the first prong of the test by demonstrating an obligation of the contract which had been impaired. See Shelinbarger, 33 Kan. App. 2d at 680; State v. Slimmer, 33 Kan. App. 2d 682, 685-86, 107 P.3d 1245, rev. denied 280 Kan. ___. These cases provide persuasive authority for the resolution of this case.
In both cases, the defendants' DUI diversions from the early 1990's were being used to enhance the penalty of a subsequent DUI conviction committed after K.S.A. 8-1567 was amended in 2001. Unlike this case, the diversion agreements included an express provision concerning their future use: "The defendant understands that even if this case is ultimately dismissed, this diversion counts for the next five years as a conviction under State and City law for sentencing purposes in any subsequent D.U.I. case . . . ." Shelinbarger, 33 Kan. App. 2d at 679, 681; Slimmer, 33 Kan. App. 2d at 683, 685-86.
In considering the first prong of the Bott test, the Shelinbarger court stated:
"`Before we can find impairment of a contract we must find an obligation of the contract which has been impaired.' Keefe v. Clark, 322 U.S. 393, 396, 88 L. Ed. 1346, 64 S. Ct. 1072 (1944). Therefore, we begin with an analysis of whether the City, in its 1991 diversion agreement with Shelinbarger, promised Shelinbarger immunity from future changes in state law.

*258 "Where a contract is between a political subdivision of a state and a private individual, `settled principles of construction require that the obligation alleged to have been impaired be clearly and unequivocally expressed.' 322 U.S. at 396-97. Moreover, `[f]or just as no person has a vested right in any general rule of law or policy of legislation entitling him to insist that it shall remain unchanged for his benefit [citations omitted], so an immunity from a change of the general rules of law will not ordinarily be implied as an unexpressed term of an express contract. [Citations omitted.]' Chicago & Alton R. R. v. Tranbarger, 238 U.S. 67, 76, 59 L. Ed. 1204, 35 S. Ct. 678 (1915).
. . . .
"We find that this language [of the diversion agreement] did not expressly and unequivocally grant Shelinbarger immunity from future changes in state law; rather, this provision merely apprised Shelinbarger of then existing state and city law. And, this incorporation of existing law is of no consequence, as `[n]ot only are existing laws read into contracts in order to fix obligations as between the parties, but the reservation of essential attributes of sovereign power is also read into contracts as a postulate of the legal order.' Home Bldg. & L. Assn. v. Blaisdell, 290 U.S. 398, 435, 78 L. Ed. 413, 54 S. Ct. 231 (1934). Legislation to protect the public safety falls within this reserved power. Blaisdell, 290 U.S. at 436.
"In short, the diversion agreement does not contain any promise by the City to immunize Shelinbarger from future changes in state law. Without such an obligation, there can be no impairment of contract under the Contract Clause of the United States Constitution." 33 Kan. App. 2d at 680-81.
Slimmer resolved the issue in a similar fashion, finding no obligation arising under the diversion agreement was impaired:
"This language [of the diversion agreement] contained no promise by the City that the diversion would only count for the next 5 years. The language did not expressly and unequivocally grant Slimmer immunity from future changes in state law; rather, the provision merely apprised Slimmer of then existing state and city law. Furthermore, this incorporation of existing law was of no consequence as existing laws are necessarily read into contracts in order to fix obligations between the parties. See Home Bldg. & L. Assn. v. Blaisdell, 290 U.S. 398, 435, 78 L. Ed. 413, 54 S. Ct. 231 (1934).
"Slimmer argues that the statutory amendment substantially impaired his contract rights because he might not have entered into the diversion had he known that the effect of the agreement could last for more than 5 years. However, there is no evidentiary basis in the record to support this assertion. Slimmer still received the primary benefit of his diversion agreement which provided that the City case would be dismissed with prejudice if Slimmer fulfilled all terms of the agreement. Furthermore, the constitutional prohibition against the impairment of contracts is subject to the exercise by the State of its police power. Bingo Catering & Supplies, Inc. v. Duncan, 237 Kan. 352, 360, 699 P.2d 512 (1985). Thus, Slimmer's *259 diversion agreement carried with it the implied condition that the State, under its police power, might amend the law or enact new laws that could affect the agreement.
"In short, Slimmer's diversion agreement did not contain any promise by the City to immunize Slimmer from future changes in state law. Without such an obligation, there can be no impairment. Slimmer received the primary benefit of his diversion agreement, and the agreement was subject to changes in existing law. We hold K.S.A. 2004 Supp. 8-1567(m)(3), as applied in this case, does not violate the Contract Clause of the United States Constitution." 33 Kan. App. 2d at 686.
Our threshold inquiry is "`whether the state law has, in fact, operated as a substantial impairment of a contractual relationship [in the 1986 diversion agreement].'" Energy Reserves Group, 459 U.S. at 411. The 1986 diversion agreement is a contract between the State and a private individual, the defendant Chamberlain. The question we must resolve is whether an obligation of the 1986 diversion agreement was impaired and if so whether the impaired obligation was clearly and unequivocally expressed in the 1986 diversion agreement. See Keefe, 322 U.S. at 396-97.
The Court of Appeals correctly pointed out that the defendant's 1986 diversion agreement did not include any express provisions regarding the use of the prior diversion agreements; however, existing laws are necessarily read into contracts in order to fix obligations between the parties. See Blaisdell, 290 U.S. at 435. The existing law provided that "for the purpose of determining whether a conviction [including entering into a diversion] is a first, second, third, fourth or subsequent conviction in sentencing under this section . . . only convictions occurring in the immediately preceding five years, including prior to the effective date of this act, shall be taken into account." See K.S.A. 1986 Supp. 8-1567(j)(1) and (3).
The defendant and the amicus read this provision as guaranteeing that the 1986 DUI diversion could only be used to enhance a sentence for 5 years. However, the Court of Appeals correctly determined that the 1986 statute and the amended statute, are both based upon the current conviction, not past convictions. The 1986 5-year decay provision, while incorporated into the diversion agreement, was simply a statement of the law for DUI sentencing enhancement *260 at that time. When the defendant was granted a diversion in 1986, the provision of the statute relating to enhanced sentencing was not applicable to him at that time.
The use of the defendant's 1986 diversion agreement for sentencing enhancement did not alter the provisions of the 1986 diversion agreement. Neither K.S.A. 1986 Supp. 8-1567(j)(1) and (3) nor K.S.A. 8-1567(l)(1) and (3) placed any limitations on prior diversion agreements, nor did they guarantee that the time period for the use of prior convictions would remain constant. Thus, the obligation alleged to have been impaired was not clearly and unequivocally expressed as required by the United States Supreme Court in Keefe, 322 U.S. at 396-97. See also People v. Gipson, 117 Cal. App. 4th 1065, 1070, 12 Cal. Rptr. 3d 478 (2004) (Sentencing defendant under California's three strikes law which was enacted after defendant entered into plea agreement for prior offense did not violate the Contract Clause where amendment did not create or destroy any substantive rights defendant had in the plea bargain and the increased penalty in the current case had nothing to do with the previous case except to bring the defendant within the three strikes law).
In like manner, neither the language of the 1986 diversion agreement nor the incorporated 1986 statutory language expressly and unequivocally granted the defendant immunity from future changes in state law. Nor may such immunity be implied for "an immunity from a change of the general rules of law will not ordinarily be implied as an unexpressed term of an express contract." Tranbarger, 238 U.S. at 76. The 1986 diversion agreement carried with it the implied condition that the State, under its reserved police power to protect the public safety, might amend the law or enact new laws that could affect the agreement. See Blaisdell, 290 U.S. at 436; Meehan v. Kansas Dept. of Revenue, 25 Kan. App. 2d 183, 190, 959 P.2d 940, rev. denied 265 Kan. 885 (1998) ("Because of the State's strong interest in regulating driving and the clear evidence of havoc rendered by drunk drivers, the State has legitimate police power with laws designed to penalize and deter driving after consuming alcohol or drugs.").
*261 The defendant argues the "very purpose of the contract was to avoid a conviction and the long-term legal consequences and the social stigma that flow from a criminal record." However, the defendant avoided a criminal conviction and has no 1986 DUI conviction listed in his criminal history. He fails to recognize that a diversion or conviction in 1986 could be considered for sentencing enhancement at a later date. While the 1986 diversion provided the defendant with those benefits when compared to a conviction, the diversion provided the defendant no additional benefits over being convicted for purposes of future sentencing enhancement. The defendant has not established the impairment of any obligation under his 1986 diversion agreement.
We conclude that the defendant has not met the threshold issue of establishing that any obligation of the 1986 diversion agreement has been impaired. Further analysis under the remaining two prongs of the Bott test is unnecessary. K.S.A. 8-1567(l)(3) only affects the defendant's current DUI, an enhanced felony sentence based upon the defendant's two previous diversion agreements. K.S.A. 8-1567, as amended in 2001, only affects the defendant's 2002 DUI conviction and has no effect on the contract rights of the defendant's 1986 diversion agreement. The Court of Appeals correctly concluded that K.S.A. 8-1567(l)(3), see K.S.A. 2004 Supp. 8-1567(m)(3), is not an unconstitutional impairment of the defendant's contractual rights under his 1986 diversion agreement.
Affirmed.
LOCKETT, J., Retired, assigned.
