
94 P.3d 8 (2004)
136 N.M. 8
2004-NMCA-077
STATE of New Mexico, Plaintiff-Appellee,
v.
Leon Joseph SHAY, Defendant-Appellant.
State of New Mexico, Plaintiff-Appellee,
v.
James Edward Vonbehren, Defendant-Appellant.
Nos. 23,594, 23,554.
Court of Appeals of New Mexico.
April 21, 2004.
Certiorari Granted June 10, 2004.
Patricia A. Madrid, Attorney General, Elizabeth Blaisdell, Assistant Attorney General, Albuquerque, NM, Arthur W. Pepin, Assistant Attorney General, Santa Fe, NM, for Appellee in No. 23,594.
Patricia A. Madrid, Attorney General, Arthur W. Pepin, Assistant Attorney General, Santa Fe, NM, for Appellee in No. 23,554.
John B. Bigelow, Chief Public Defender, Susan Roth, Assistant Appellate Defender, Santa Fe, NM, for Appellants Leon Joseph Shay in No. 23,594 and James Edward Vonbehren in No. 23,554.
Certiorari Granted, No. 28,670, June 10, 2004.


*9 OPINION

WECHSLER, Chief Judge.
{1} In separate appeals, Defendants Leon Joseph Shay and James Vonbehren appeal their sentences as habitual offenders. We address both appeals together in this opinion because both Shay and Vonbehren argue that the amendment to NMSA 1978, § 31-18-17 (2002), which had an effective date of July 1, 2002, should apply to their cases. The 2002 amendment to Section 31-18-17 changes the prior statute by prohibiting the use of a conviction more than ten years old in enhancing sentences for habitual offenders. We determine that the legislature intended Section 31-18-17 to apply as amended to cases when the sentence for the underlying crime is imposed after July 1, 2002. We reverse the habitual offender sentences and remand for re-sentencing in both cases.

Background
{2} The habitual offender statute provides for the enhancement of a sentence based on a defendant's prior felony convictions. See § 31-18-17 (2002). Prior to the 2002 amendment, the imposition of this enhancement was mandatory in all cases in which there was a prior felony conviction, regardless of the date of the conviction. See NMSA 1978, § 31-18-17 (1993). In 2002, the legislature amended Section 31-18-17 to allow the district court some discretion in imposing the habitual enhancement to cases in which there is one prior felony conviction. Section 31-18-17(A) (2002). It also redefined "prior felony conviction" to mean:
(1) a conviction, when less than ten years have passed prior to the instant felony conviction since the person completed serving his sentence or period of probation or parole for the prior felony, whichever is later, for a prior felony committed within New Mexico whether within the Criminal Code [30-1-1 NMSA 1978] or not; or
(2) any prior felony, when less than ten years have passed prior to the instant felony conviction since the person completed serving his sentence or period of probation or parole for the prior felony, whichever is later, for which the person was convicted other than an offense triable by court martial if:
(a) the conviction was rendered by a court of another state, the United States, a territory of the United States or the commonwealth of Puerto Rico;
(b) the offense was punishable, at the time of conviction, by death or a maximum term of imprisonment of more than one year; or
(c) the offense would have been classified as a felony in this state at the time of conviction.
Section 31-18-17(D) (2002) (alteration in original). This new definition excludes prior felonies when the sentence and any period of probation or parole in the prior felony was completed ten or more years before the current conviction. Id.

State v. Shay
{3} Shay was indicted on December 7, 2001 on charges of having committed felony residential burglary and misdemeanor larceny on November 15, 2001. On August 26, 2002, he pleaded guilty to these crimes, resulting in his conviction. The State filed a supplemental information on October 21, 2002, charging Shay with being a habitual offender based on three prior felony convictions in 1997, 1990, and 1985. Shay admitted that he was convicted of these felonies. The district court held a sentencing hearing on October 21, 2002, and on October 22, 2002, entered its judgment and sentence. It enhanced Shay's sentence for the residential burglary offense by eight years under Section 31-18-17 as it read prior to the 2002 amendment. In doing so, the district court used all three prior felony convictions to enhance Defendant's sentence, including the 1985 felony conviction.

State v. Vonbehren
{4} Vonbehren was indicted on October 11, 2001 for felony shoplifting. He was convicted following a jury trial on July 3, 2002. The State filed a supplemental information on July 8, 2002, charging Vonbehren as a habitual offender due to four prior felony convictions in 1989, 1988, 1983, and 1981. After Vonbehren admitted to the four prior felonies, *10 he filed a motion requesting the court to determine that the habitual offender statute was no longer applicable to three of the felonies because of the amendment to Section 31-18-17. The district court denied Vonbehren's motion, and on October 15, 2002, sentenced Vonbehren as a habitual offender, enhancing his sentence based on all four prior felony convictions.

Shay's Failure to Preserve Issue for Appeal
{5} The State argues that Shay waived the issue of the applicability of the 2002 amendment by pleading guilty to the charges against him, agreeing in writing to an eight-year habitual offender enhancement of his sentence, and failing to reserve the issue for appeal. The State argues that, even if the sentence is unlawful, Shay's remedy is limited to bringing actions under Rules 5-801 or 5-802 NMRA 2004. Shay counters that the issue was argued at the plea and sentencing hearings and that he was never informed that he was waiving his right to appeal the enhancement. He asserts that all parties, including the district court, knew he would appeal the enhancement. The transcripts of the change of plea and sentencing hearings confirm this assertion.
{6} Although Shay properly preserved the issue, he failed to reserve the issue in writing as required by Rule 5-304(A)(2) NMRA 2004. See State v. Hodge, 118 N.M. 410, 416, 882 P.2d 1, 7 (1994) (discussing the need to preserve and reserve the issue of sufficiency of the evidence when pleading guilty). This Court, however, has allowed both the state and defendants to challenge illegal sentences for the first time on appeal. See, e.g., State v. Bachicha, 111 N.M. 601, 605-06, 808 P.2d 51, 55-56 (Ct.App.1991). This result is based on the rationale that the district court does not have jurisdiction to impose an illegal sentence and the appellate rules allow jurisdictional issues to be raised for the first time on appeal. See Rule 12-216 NMRA 2004. Our Supreme Court in Hodge recognized that a guilty plea does not waive the right to appeal jurisdictional issues. See Hodge, 118 N.M. at 414, 882 P.2d at 5 (stating "a voluntary guilty plea ordinarily constitutes a waiver of the defendant's right to appeal his conviction on other than jurisdictional grounds"). Because the issue involves an illegal sentence, which is a jurisdictional issue, we address the merits.

Applicability of the 2002 Amendment

Interpretation of Legislative Intent
{7} In enacting the 2002 amendment to Section 31-18-17, the legislature was silent as to the event which would trigger the application of the amendment, leaving us to search "for the spirit and reason the [l]egislature utilized in enacting the statute." State v. Davis, 2003-NMSC-022, ¶ 6, 134 N.M. 172, 74 P.3d 1064. See generally State v. Rowell, 121 N.M. 111, 114, 908 P.2d 1379, 1382 (1995) (stating that the main goal of statutory construction is to give effect to the intent of the legislature and that interpreting a statute is a question of law that is reviewed de novo). By deliberately changing the statute to allow the district court some discretion in imposing the enhanced penalty based on a single prior felony conviction and in narrowing the definition of a prior felony conviction, the legislature indicated its dissatisfaction with the old scheme and an intent to depart from that scheme. See State v. Morrison, 1999-NMCA-041, ¶ 11, 127 N.M. 63, 976 P.2d 1015 ("We ... assume that the legislature intends to change the existing law when it enacts a new statute with substantial rewording."). Consistent with this shift in policy, the legislature subsequently limited the definition of "prior felony conviction" in its 2003 amendment to the habitual offender statute by excluding felony convictions for driving while intoxicated from the definition of "prior felony conviction." See NMSA 1978, § 31-18-17(D)(1) (2003); cf. Davis, 2003-NMSC-022, ¶¶ 8-12, 134 N.M. 172, 74 P.3d 1064 (interpreting an amendment to NMSA 1978, § 31-18-21(A) (1977), as requiring mandatory stacking of sentences because the legislature removed discretionary language and enacted other provisions of the Criminal Sentencing Act that imposed longer periods of incarceration, leading to the "inescapable conclusion" that the legislature intended harsher and more certain punishment for crimes committed while incarcerated). All of these changes indicate a legislative *11 intent to reduce the enhancements required by Section 31-18-17.
{8} Another statute indicates that the legislature intends that reductions in criminal penalties should apply if the penalty has not already been imposed. NMSA 1978, § 12-2A-16(C) (1997) states: "If a criminal penalty for a violation of a statute or rule is reduced by an amendment, the penalty, if not already imposed, must be imposed under the statute or rule as amended." The State argues that because habitual offender proceedings do not result in a separate conviction and the enhanced penalty is for the underlying crime committed, the enhanced penalty is necessarily determined by the law in effect on the date of the commission of the crime. See State v. Mondragon, 107 N.M. 421, 423, 759 P.2d 1003, 1005 (Ct.App.1988); see also Hernandez v. State, 96 N.M. 585, 586, 633 P.2d 693, 694 (1981); State v. Gonzales, 84 N.M. 275, 279, 502 P.2d 300, 304 (Ct.App.1972). Based on Section 12-2A-16(C), we view the conclusion to be reached differently. Applying Section 12-2A-16(C) to the 2002 amendment, mindful that an enhanced sentence is part of the punishment for the crime to which the enhanced sentence attaches, see Mondragon, 107 N.M. at 423, 759 P.2d at 1005, the 2002 amendment effectively reduces the potential enhanced penalties for violating felony statutes by narrowing the definition of "prior felony conviction."
{9} Therefore, as a result of the legislative intent to reduce the potential penalties under the habitual offender provisions as indicated by the 2002 amendment to Section 31-18-17 and the intent to apply reduced penalties when the penalty has not already been imposed as indicated by Section 12-2A-16, we construe the intent of the legislature to be that it did not intend to delay the effect of its 2002 amendment by applying it only to crimes committed after its effective date. Using Section 12-2A-16(C) as a guide to the legislature's intent, the date a sentence is imposed is the appropriate date to determine whether the 2002 amendment to Section 31-18-17 applies to a given case. Because we apply the 2002 amendment prospectively to cases in which the sentence is imposed after the effective date of the amendment based on the legislature's intent, we need not address the parties' arguments concerning retroactive or prospective application of the amended statute. See State v. Mears, 79 N.M. 715, 716, 449 P.2d 85, 86 (Ct.App.1968) (stating that an act concerning pre-sentence confinement credit was not being applied retroactively when the conviction and sentence occurred after the act became effective); see also State v. Perea, 2001-NMSC-026, ¶ 4, 130 N.M. 732, 31 P.3d 1006 (stating the general proposition that a statute is to be applied prospectively unless the legislature clearly intends otherwise).
{10} Other cases relied on by the State are distinguishable. For instance, in Williams v. State, 81 N.M. 605, 607, 471 P.2d 175, 177 (1970), the issue involved a change in the law increasing the penalty for a crime when the defendant had already served 13 years incarceration. In stating that the law at the time of the commission of the crime controlled, the Court took note that Williams had been convicted, orally sentenced, and incarcerated under the law in effect in 1953, although no written judgment and sentence was entered until 1966. It determined that basic fairness prohibited the imposition of a greater sentence in the latter proceedings. Id. at 607-08, 471 P.2d at 177-78; see also State v. Armstrong, 61 N.M. 258, 260-61, 298 P.2d 941, 943 (1956) (determining that an amendment to the Parole Act, which merely advanced the eligibility date for parole, did not change the penalty provision, which remained the same, i.e., not less than one year nor more than ten years).

Inapplicability of Section 30-1-2
{11} The State argues that the legislature made a clear, unambiguous statement about the laws applicable to criminal offenses when it enacted NMSA 1978, § 30-1-2 (1963). This statute provides:
The Criminal Code has no application to crimes committed prior to its effective date.
A crime is committed prior to the effective date of the Criminal Code if any of the essential elements of the crime occurred before that date.

*12 Prosecutions for prior crimes shall be governed, prosecuted and punished under the laws existing at the time such crimes were committed.
Id. We note that Section 12-2A-16 was enacted in 1997 and that Section 30-1-2 was enacted in 1963. To the extent they conflict, the later enactment supersedes the prior. See generally State v. Encinias, 104 N.M. 740, 742, 726 P.2d 1174, 1176 (Ct.App.1986) (applying the latest expression of legislative intent regarding probation).
{12} The State relies on State v. Tipton, 78 N.M. 600, 435 P.2d 430 (1967) (Tipton III), to support its argument that Section 30-1-2 requires application of the pre-2002 habitual offender statute. In Tipton III, our Supreme Court relied on the identical 1953 version of this savings clause to determine that the district court did not err in resentencing the defendant under the repealed habitual offender statute. Tipton III, 78 N.M. at 603, 435 P.2d at 433. The history of Tipton's case is a convoluted history, reported in three appellate opinions. In brief, Tipton was convicted of rape in April 1962 in cause no. 5141. Id. at 601, 435 P.2d at 431. The next day he was charged as a habitual offender. State v. Tipton, 73 N.M. 24, 25, 385 P.2d 355, 355 (1963) (Tipton I). The information charging Tipton as a habitual offender was filed in a separate cause, no. 5154. State v. Tipton, 77 N.M. 1, 3-4, 419 P.2d 216, 217 (1966) (Tipton II). The habitual offender statute was repealed by the 1963 Criminal Code. Tipton III, 78 N.M. at 603, 435 P.2d at 433.
{13} At the time of the 1966 opinion in Tipton II, no judgment or sentence had been imposed in the original cause, no. 5141, but Tipton had been sentenced as a habitual offender in the separate habitual offender cause, no. 5154. Tipton II, 77 N.M. at 4, 419 P.2d at 217. Our Supreme Court remanded Tipton's second appeal with instructions "to vacate the sentence and commitment in No. 5154 and to enter its judgment imposing sentence upon defendant as an habitual offender in No. 5141." Id. at 4, 419 P.2d at 218.
{14} In the third and last reported appeal, the Court rejected Tipton's argument that he should not be sentenced under the habitual offender statute because it had been repealed prior to the time the sentence was imposed in the original cause, no. 5141. The Court relied on the 1953 version of the savings clause to determine that the repealed law applied to Tipton's sentencing in the original cause. Tipton III, 78 N.M. at 603, 435 P.2d at 433.
{15} The facts in Tipton's case differ dramatically from the facts in this case. Most significantly, Tipton was originally sentenced under the later, repealed habitual offender statute. The fact that this sentence had been imposed in the wrong case and Tipton was later sentenced in the correct case after the statute had been repealed, should not render the statute inapplicable to the later sentence. In this case, no sentence was imposed prior to the effective date of the 2002 amendment to Section 31-18-17.
{16} In addition to the factual differences between Tipton III and this case, it appears that Section 30-1-2 was enacted as a transitional rule prior to the enactment of the Criminal Code. In a more recent case, State v. Hargrove, 108 N.M. 233, 234-35, 771 P.2d 166, 167-68 (1989), our Supreme Court applied a different transitional rule to determine that the defendant was properly sentenced under the laws in effect at the time he committed the crimes. Those laws provided for a life sentence for first degree felonies, which the defendant had committed in 1976 and 1978. Id. at 234, 771 P.2d at 167. On July 1, 1979, the sentencing law changed to provide for eighteen years imprisonment for first degree felonies. Id. The Court noted that the legislature "specifically enacted a transitional rule to provide sentencing guidelines for crimes committed prior to the enactment of the Criminal Sentencing Act," which clearly expressed the legislature's intent "that for crimes committed prior to July 1, 1979, the sentencing provision in effect at the time of the commission of the crime controls." Id. at 235, 771 P.2d at 168. This transitional rule was embodied in a statute with language similar to that in Section 30-1-2. See Hargrove, 108 N.M. at 235, 771 P.2d at 168.
*13 {17} We do not perceive any distinction between the terms "savings clause" articulated in Tipton III about Section 30-1-2 and "transitional rule," relating to the enactment of the Criminal Sentencing Act, as articulated in Hargrove. See Hargrove, 108 N.M. at 235, 771 P.2d at 168 (citing favorably In re Estrada, 63 Cal.2d 740, 48 Cal.Rptr. 172, 408 P.2d 948, 955 (1965) (en banc), a case discussing a savings clause). Both terms refer to the linkage of prior and newly enacted law. The significance in this case is that the legislature did not enact any transitional rule or savings clause expressing an intent to have the 2002 amendment to the habitual offender statute apply to crimes committed prior to July 1, 2002. Instead, we are left with the legislative intent embodied in Section 12-2A-16, which indicates a policy decision to apply a reduced sentence if the penalty has not been imposed. Because of this statutory policy, the out-of-state cases cited by the State in Vonbehren's case are not applicable.

Inapplicability of Article IV, Sections 33 and 34
{18} The State also asserts that applying the 2002 amendment to Defendants would violate the New Mexico Constitution. In Shay's case, the State relies on New Mexico Constitution Article IV, Section 33, which states, "No person shall be exempt from prosecution and punishment for any crime or offenses against any law of this state by reason of the subsequent repeal of such law." The State argues that Section 12-2A-16 conflicts with this constitutional provision. The 2002 amendment, however, does not repeal any law proscribing a crime or offense. Instead, it amends the definition of "prior felony conviction" and allows some judicial discretion in sentencing habitual offenders with one prior felony conviction. Article IV, Section 33 does not apply to the 2002 amendment or to our interpretation of the amendment through Section 12-2A-16.
{19} The only reported cases considering Article IV, Section 33 in the context of habitual offender proceedings involve the repeal of the habitual offender statute. See Tipton III, 78 N.M. at 603, 435 P.2d at 433. Our Supreme Court in Tipton III stated without discussion that it relied on Article IV, Section 33 as well as the 1953 savings clause to determine that the repealed habitual offender statute should apply to Tipton. Tipton III, 78 N.M. at 603, 435 P.2d at 433. But this result does not necessarily lead to the conclusion that Section 12-2A-16 conflicts with Article IV, Section 33 or that the legislature is barred from changing the definition of prior felony conviction for habitual offenders and applying the new definition to cases in which the penalty for the underlying crime has not yet been imposed. Again, we distinguish Tipton III on its facts. In Tipton III, the separate habitual offender proceedings, in which Tipton was originally sentenced as a habitual offender, were conducted under the repealed law. Id. at 603, 435 P.2d at 433. The Court correctly determined that the subsequent repeal of this law did not exempt Tipton from its provisions. Id. In this case, the habitual offender act was not repealed and Article IV, Section 33 is not implicated.
{20} The State contends in Vonbehren's case that the New Mexico Constitution Article IV, Section 34 prohibits application of the 2002 amendment. This provision states: "No act of the legislature shall affect the right or remedy of either party, or change the rules of evidence or procedure, in any pending case." Id. According to the State, the 2002 amendment changed the right or remedy available to the State in seeking habitual enhancements. However, this right or remedy is entirely contingent upon and does not ripen until a defendant is convicted of a crime. See NMSA 1978, § 31-18-19 (1977) (stating that the district attorney shall bring an information charging a defendant as a habitual offender after "sentence or conviction"), and NMSA 1978, § 31-18-20 (1983) (outlining the procedure for habitual offender proceedings that occur after conviction). Shay and Vonbehren were not convicted of the crimes for which they were sentenced until after the effective date of the amendment. Moreover, although the underlying cases were pending prior to the effective date of the 2002 amendment, no habitual proceeding was pending in either case until after the effective date of the 2002 amendment. Our Supreme Court has observed that the definition of "pending" for the purpose of Article *14 IV, Section 34 depends on the statute in question and that a case is pending if it is "depending," "remaining undecided" and "not terminated." Stockard v. Hamilton, 25 N.M. 240, 244-45, 180 P. 294, 295 (1919); DiMatteo v. County of Dona Ana, 109 N.M. 374, 377, 785 P.2d 285, 288 (Ct.App.1989). The supplemental information in each case raised to each court the issue of habitual offender status, which then needed to be decided. See generally In re Held Orders of U.S. W. Communications, Inc., 1999-NMSC-024, ¶ 14, 127 N.M. 375, 981 P.2d 789 (discussing the intent of Article IV, Section 34 as rooted in the territorial history of New Mexico and its purpose to maintain an independent judiciary; applying this principle to determine that the cases at issue were not pending within the meaning of Article IV, Section 34 because there was no legislative intent to interfere with the merits of the cases).
{21} Because no habitual offender proceedings were pending at the time the 2002 amendments became effective and because any right or remedy the State may have to prosecute habitual offenders does not ripen until after the conviction in the underlying case, there is no constitutional prohibition to applying the 2002 amendment to cases in which the supplemental information charging habitual offender status was not filed before July 1, 2002.

Proof of Prior Felony Convictions
{22} Under the 2002 amendment, a prior felony conviction does not include felony convictions when the sentence was completed ten years or more before the current conviction. See § 31-18-17(D). Because the district court in each case ruled that the 2002 amendment did not apply as a matter of law, the record does not establish when Shay completed his sentence on the 1985 felony conviction or when Vonbehren completed his sentence on his 1988 and 1989 convictions. See generally State v. Elliott, 2001-NMCA-108, ¶ 35, 131 N.M. 390, 37 P.3d 107 (stating the standard and burdens of proving prior felony convictions for purposes of habitual offender enhancements). On remand, the district court will need to make these determinations.

Conclusion
{23} The 2002 amendment to Section 31-18-17 applies to all cases in which the defendant has not been sentenced before July 1, 2002, the effective date of the amendment, if the supplemental information charging habitual offender status was filed after the amendment went into effect. Because Shay and Vonbehren were sentenced in October 2002, we reverse and remand these cases for further proceedings to resentence pursuant to the 2002 amendment to Section 31-18-17.
{24} IT IS SO ORDERED.
WE CONCUR: A. JOSEPH ALARID and CYNTHIA A. FRY, Judges.
