
705 N.W.2d 286 (2005)
STATE of Iowa, Appellee,
v.
Blaine FREEMAN, Appellant.
No. 04-0781.
Supreme Court of Iowa.
September 23, 2005.
Rehearing Denied November 9, 2005.
Linda Del Gallo, State Appellate Defender, and Tricia A. Johnston and Greta *287 Truman, Assistant State Appellate Defenders, for appellant.
Thomas J. Miller, Attorney General, Martha E. Boesen, Assistant Attorney General, Thomas J. Ferguson, County Attorney, and Brad Walz, Assistant County Attorney, for appellee.
WIGGINS, Justice.
On October 12, 2003, the police found marijuana in Blaine Freeman's pocket during a search incident to arrest. The State charged him with possession of marijuana, third offense, a class "D" felony in violation of Iowa Code section 124.401(5) (2003).[1] He pled guilty to the charges on April 1, 2004. The district court sentenced him to up to five years in prison and imposed a suspended fine.
On appeal, Freeman contends the sentence is illegal. He notes his first drug conviction for possession of cocaine occurred on April 21, 1992, which was seven months after September 21, 1991, the date he had committed his second drug offense. His conviction for the second offense for delivery of marijuana occurred on May 4, 1992, less than two weeks after entry of the first. The sentencing judges in each case ordered Freeman to serve the sentences for these prior convictions concurrently.
In the present case, Freeman asserts that his first and second convictions should count as only one conviction for purposes of the enhancement portion of the statute. The court of appeals agreed, vacated the sentence, and remanded for resentencing. We granted the State's application for further review. On further review, we affirm the court of appeals decision and vacate the sentence of the district court.

I. Scope of Review.
We review the district court's sentence for correction of errors at law. State v. Kapell, 510 N.W.2d 878, 879 (Iowa 1994); Iowa R.App. P. 6.4. A sentence is void if the statute does not authorize the district court's sentence. Overton v. State, 493 N.W.2d 857, 859 (Iowa 1992). "Therefore, we examine the sentences imposed by the district court to determine whether they comply with the relevant statutes." Kapell, 510 N.W.2d at 879.

II. Analysis.
Freeman contends the district court can only sentence him as a second offender because of the timing of his prior convictions. A second offender is guilty of an aggravated misdemeanor, while a third offender is guilty of a class "D" felony. Iowa Code § 124.401(5). The factual basis for Freeman's argument is that the conviction and sentencing by the court for his possession of cocaine on April 21, 1992 occurred after the commission of his offense for delivery of marijuana (September 21, 1991), but before his conviction for that offense (May 4, 1992).
We must construe Iowa Code section 124.401(5) to determine whether the district court can use Freeman's two previous convictions to enhance his sentence for the present offense. Iowa Code section 124.401(5) provides in relevant part:
It is unlawful for any person knowingly or intentionally to possess a controlled substance unless such substance was obtained directly from, or pursuant to, a valid prescription or order of a practitioner while acting in the course of the practitioner's professional practice, or except as otherwise authorized by this chapter. Any person who violates this subsection is guilty of a serious misdemeanor *288 for a first offense. A person who commits a violation of this subsection and who has previously been convicted of violating this chapter or chapter 124A, 124B, or 453B is guilty of an aggravated misdemeanor. A person who commits a violation of this subsection and has previously been convicted two or more times of violating this chapter or chapter 124A, 124B, or 453B is guilty of a class "D" felony.
Id. (emphasis added). "The goal of statutory construction is to determine legislative intent." Auen v. Alcoholic Beverages Div., 679 N.W.2d 586, 590 (Iowa 2004). Legislative intent is determined "from the words chosen by the legislature, not what it should or might have said." Id.
A review of our case law in this area reveals the considerations that will guide our decision-making process to determine the validity of Freeman's position. In 1974, we first discussed this issue in connection with a statute that punished recidivism. State v. Conley, 222 N.W.2d 501, 501-02 (Iowa 1974). In Conley, the defendant appealed his sentence after the district court determined he was a habitual offender. Id. at 501. The habitual offender statute at the time provided in part: "Whoever has been twice convicted of crime, sentenced, and committed to prison ... shall, upon conviction of a felony committed in this state after the taking effect of this section, be deemed to be a habitual criminal...." Iowa Code § 747.5 (1973).
Conley committed his first offense on January 15, 1969 and his second offense on April 28, 1969 while he was out on bail awaiting trial for the first offense. Conley, 222 N.W.2d at 502. Conviction and sentence for the first offense occurred July 16, 1969, while conviction and sentence for the second offense occurred May 5, 1970. Id. Therefore, Conley committed both offenses before the district court convicted or sentenced him for either. When the district court sentenced him for the first and second offenses, the court ordered him to serve the sentences concurrently. Id.
After his third conviction on June 28, 1973, the district court sentenced Conley as a habitual offender. Id. He appealed; we reversed, and remanded for resentencing. Id. at 501, 503. In deciding Conley, we relied on the principle of statutory construction providing that we strictly construe penal statutes with doubts resolved in favor of the accused. Id. at 502. We then determined the purpose of the recidivism statute was to "deter and punish incorrigible offenders," and the legislature's intent was to have it "apply to persistent violators who have not responded to the restraining influence of conviction and punishment." Id. at 503. Even though the statute was silent on the matter, we held "the first conviction and imposition of sentence must precede the second offense, and that both of the prior convictions and impositions of sentence must precede the third conviction." Id. This sequence was not present in Conley. Id.
We reaffirmed our decision in Conley in a case decided six months later. State v. Tillman, 228 N.W.2d 38, 41-42 (Iowa 1975). There we further explained our holding in Conley and stated that "[o]ur statute dictates that each offense must have been complete as to conviction, sentence and commitment to prison before the commission of the next in order that it qualify for application of the enlarged punishment of [section] 747.5." Id. at 41; accord State v. Robinson, 262 N.W.2d 270, 271-72 (Iowa 1978) (reaffirming Conley).
Subsequent to our decisions in Conley and Tillman, the legislature amended the habitual offender statute to provide in relevant part: "An habitual offender is any person convicted of a class `C' or a class `D' felony, who has twice before been convicted *289 of any felony...." Iowa Code § 902.8 (1981). We were then confronted with the question of whether the habitual offender statute, as amended, applied when the two prior convictions occurred on the same day. State v. Hollins, 310 N.W.2d 216, 216 (Iowa 1981). In Hollins, the defendant was not convicted of the first offense before he committed the second because he pled guilty to both of the first two offenses on the same day. Id. at 217. Despite the change in language in the statute, we reaffirmed our holding in Conley to follow the general rule that each offense must be complete as to a conviction and sentencing before commission of the next in order to qualify for the enhancement of penalty under a habitual offender statute. Id. at 217-18.
Within the last few years, we reaffirmed Conley and Hollins. State v. Woody, 613 N.W.2d 215, 218 (Iowa 2000). There we restated our adherence to the general rule that recidivism statutes only apply when the commission of the current offense follows the previous convictions. Id. We determined Woody's sentence was illegal because the proper sequence between the current offense and previous convictions did not exist; therefore, we remanded the case for resentencing. Id.
We also have interpreted a statute that allows the State to suspend the driver's license of a person found to be a habitual offender. State v. Thomas, 275 N.W.2d 422, 422-23 (Iowa 1979). At issue in that case was our habitual traffic offender statute, which provided in relevant part:
As used in this division, "habitual offender" means any person who has accumulated convictions for separate and distinct offenses described in subsections 1, 2, or 3 ... as follows:
1. Three or more convictions within a six-year period....
Iowa Code § 321.555(1) (1977). Proceedings brought under section 321.555(1) are civil actions. Iowa Dep't of Transp. v. Iowa Dist. Ct., 530 N.W.2d 725, 727 (Iowa 1995). In Thomas, the State alleged the defendant was a habitual traffic offender under section 321.555(1). 275 N.W.2d at 422. Although Thomas's record contained convictions for three violations within a six-year period, she argued the last two offenses were "not `separate and distinct' offenses because they arose out of the same events." Id. at 422-23. The issue before us was whether the last two convictions, having arisen out of the same acts, constituted only one offense. If they did, then Thomas had only two, instead of the required three, convictions.
We concluded, "the legislature intended three convictions within six years to be grounds for suspension without the added condition that each must occur at a different time." Id. at 423. In our analysis, we noted, "there is a significant difference in the philosophy behind habitual criminal statutes . . . and those dealing with driving violations." Id. We distinguished Conley by stating that the primary purpose of the habitual criminal statute was rehabilitation, while the primary purpose of the civil habitual traffic offender statute was to protect the public from those drivers who refuse to observe safety rules. Id. The present case is distinguishable from Thomas because we still believe there is a significant difference in the philosophy behind a habitual criminal statute that enhances the term of incarceration, and a civil statute requiring the State to suspend a driver's license for being a habitual violator.
Additionally, we have had occasion to interpret whether two prior OWI convictions on the same day count as one offense for a criminal sentencing enhancement under Iowa Code section 321.281(2) (1983). State v. Clark, 351 N.W.2d 532, 535-37 *290 (Iowa 1984). The applicable section of the 1983 Code contained the following provisions:
A person convicted of a violation of this section, upon conviction or a plea of guilty, is guilty of:

a. A serious misdemeanor for the first offense. . . .

b. An aggravated misdemeanor for a second offense. . . .

c. A class "D" felony for a third offense and each subsequent offense.
Iowa Code § 321.281(2) (1983).
Relying on Hollins, we held that each of the prior offenses under the OWI statute must have reached a final judgment in order to enhance the punishment for the current offense. Clark, 351 N.W.2d at 536. Consequently, we held the district court could only consider Clark's prior convictions as one conviction for enhanced punishment because two of Clark's OWI convictions occurred on the same day. Id. at 537.
We had a chance to revisit the OWI enhancement provisions after the legislature twice amended section 321.281(2). State v. Spoonemore, 598 N.W.2d 311, 311-12 (Iowa 1999). In that case, Spoonemore was convicted of OWI, third offense, and being a habitual offender. Id. at 311. Relying on Clark, Spoonemore argued the district court could not treat his two prior OWI convictions as multiple prior offenses because the court entered judgments for the prior convictions on the same day. Id.
We noted in an apparent response to Clark, the legislature amended section 321.281 in 1986 by renumbering it as 321J.2(3) and adding the following provision:
"Each previous violation shall be considered a separate previous offense without regard to whether each was complete as to commission and conviction or deferral of judgment following or prior to any other previous violation."
Id. (citation omitted). In 1990, the legislature again amended the statute by deleting the italicized language from the statute. Id. at 312. At the time of the offense at issue in Spoonemore, the language of the statute provided, "`[e]ach previous violation shall be considered a separate previous offense.'" Id. (alteration in original).
We determined the 1986 amendment required a different result than that reached in Clark. Id. Further, we held that the 1990 amendment deleting certain language from the 1986 amendment did not alter the statute's meaning concerning the issue before us. Id. The language in the amendments clearly negated the characterization of prior offenses that this court adopted in Clark. Id. We therefore held the district court properly convicted Spoonemore of OWI, third offense. Id.
Lastly, we have interpreted an enhancement provision of our statutes dealing with sentencing for possession of a controlled substance with intent to deliver. State v. Wade, 467 N.W.2d 283, 285 (Iowa 1991). There Iowa Code section 204.411 provided:
1. Any person convicted of a second or subsequent offense under this chapter, may be punished by imprisonment for a period not to exceed three times the term otherwise authorized, or fined not more than three times the amount otherwise authorized, or punished by both such imprisonment and fine.
2. For purposes of this section, an offense is considered a second or subsequent offense, if, prior to the person's having been convicted of the offense, the offender has ever been convicted under this chapter or under any state or federal statute relating to narcotic drugs or cocaine, marijuana, depressant, stimulant, or hallucinogenic drugs.
*291 Iowa Code § 204.411 (1989) (emphasis added). Wade contended the district court could not treat him as a second offender because at the time of his arrest for the present offense, he had not yet been convicted of the earlier offense. Wade, 467 N.W.2d at 285. We held otherwise, relying on the specific language used by the legislature in the statute. Id. We acknowledged the general rule applicable to recidivism statutes providing a court cannot enhance punishment unless all the prior convictions preceded the commission of the present offense, and each prior offense and conviction occurred in chronological sequence. Id. We held the general rule was inapplicable to section 204.411 because the legislature included language specifically negating the rule. Id.
Turning to the facts of this case, we must determine whether section 124.401(5) requires that each offense be complete as to a conviction and sentencing before commission of the next in order to qualify for the enhancement of punishment. Obviously, the State argues section 124.401(5) does not have any such requirement.
Prior to 1998, a person who violated section 124.401(5) was guilty of a serious misdemeanor. Iowa Code § 124.401(5) (Supp.1997). In 1998, the legislature amended section 124.401(5) to include the enhanced penalty provisions for recidivism. 1998 Iowa Acts ch. 1138, § 25. By 1998, our cases consistently held that this state followed the general rule that each offense must be complete as to a conviction and sentencing before commission of the next in order to qualify for the enhancement of penalty under a habitual offender statute, unless the legislature expressly provided otherwise. See, e.g., Wade, 467 N.W.2d at 285; Clark, 351 N.W.2d at 536; Hollins, 310 N.W.2d at 217-18; Robinson, 262 N.W.2d at 271-72; Tillman, 228 N.W.2d at 41-42; Conley, 222 N.W.2d at 503. The legislature understood the general rule applicable to habitual offender statutes and exercised its authority to exclude the application of the rule by including specific language evidencing its intent to do so in our enhancement statute governing sentencing for possession of a controlled substance with intent to deliver.[2]Wade, 467 N.W.2d at 285.
When the legislature enacted section 124.401(5), it did so without including language to exclude the operation of the general rule that each offense must have been complete as to a conviction and sentencing before the commission of the next in order that it qualifies for the enhancement of penalty under a recidivism statute. Unless there is clear evidence to the contrary, when the legislature enacts a law, "[w]e assume the legislature knew the existing state of the law and prior judicial interpretations of similar statutory provisions." Jahnke v. City of Des Moines, 191 N.W.2d 780, 787 (Iowa 1971). Accordingly, we believe the rule of Conley, Hollins, and Clark is applicable to the present case. Therefore, the district court should not have considered Freeman as a third offender, because he did not commit his second offense after his first conviction.

III. Disposition.
Because Freeman's sentence is illegal, we affirm the court of appeals decision, vacate the sentence of the district court, *292 and remand the case for resentencing consistent with this opinion.
DECISION OF COURT OF APPEALS AFFIRMED; SENTENCE VACATED, AND CASE REMANDED FOR RESENTENCING.
All justices concur except CARTER and LARSON, JJ., who dissent.
CARTER, J. (dissenting).
I respectfully dissent.
At the outset, I note this is the first time that this statute has come before us on the enhanced degree-of-guilt issue that we now face. For this reason, I submit that we should not be deterred from writing our analysis of this legislation on a clean slate, unencumbered by the interpretive baggage coming out of our opinions construing the habitual-offender statutes. It is evident that the only sustainable ground for upholding the interpretation we have placed on those statutes is the doctrine of stare decisis. However, resort to those decisions in seeking to interpret the legislation before us must necessarily be by way of analogy. Stare decisis should not force us to invoke by analogy flawed interpretations of other statutes not now before us.
The relevant language of the statute now before us states:
A person who commits a violation of this subsection and has previously been convicted two or more times of violating this chapter or chapter 124A, 124B, or 453B is guilty of a class "D" felony.
Iowa Code § 124.401(5). The meaning of these words is crystal clear. They convey the message that, if a person who has violated subsection (5) of 124.401 has previously been convicted two or more times of violating chapter 124 or other designated chapters containing controlled-substance offenses, that person is guilty of a class "D" felony. There is absolutely nothing contained in the statutory language requiring that the prior convictions be in any particular order with respect to time of perpetration and time of conviction.
The primary purpose of statutory interpretation is to reveal legislative intent. State v. McCoy, 618 N.W.2d 324, 325 (Iowa 2000). A court gleans this intent from the words used by the legislature. State v. Johnson, 630 N.W.2d 583, 586 (Iowa 2001); State v. Kidd, 562 N.W.2d 764, 765 (Iowa 1997). We are not allowed to speculate as to probable legislative intent apart from the words used in the statute. Johnson, 630 N.W.2d at 586; State v. Adams, 554 N.W.2d 686, 689 (Iowa 1996). We have said that we will not "read something into the law that is not apparent from the words chosen by the legislature." State v. Guzman-Juarez, 591 N.W.2d 1, 2 (Iowa 1999). To read into the statute a qualification that has not been recognized by the legislature is to engage in judicial legislation.
In a three-offense sequence, the order of commission and conviction for the first two offenses is of scant importance in fixing culpability for a third offense. Assuming that the legislative purpose is to increase punishment for those who have not responded to prior judicial sanctions, that goal is met any time an enhanced degree of guilt is imposed on a third offense committed after conviction of two prior offenses. The order of the first two offenses inter se is simply irrelevant in that consideration. Moreover, we should also recognize that the notion of failure to respond to sanctions is not the only consideration involved in recidivist sentencing. The circumstance of having committed multiple offenses provides a valid reason for legislative enlargement of the degree of guilt on a third or subsequent offense, irrespective *293 of considerations involving response to sanctions.
If we are to consider our habitual-offender decisions, we should recognize that the path therein taken has been an errant one. Prior to State v. Hollins, 310 N.W.2d 216 (Iowa 1981), the Conley case and other cases that following it interpreted a habitual-offender law that required not only two prior convictions but also two prior sentences of imprisonment. This court in those cases interpreted the words "twice convicted of crime, sentenced, and committed to prison" to envision a fixed sequence of offense, conviction, sentence, and imprisonment followed by a second sequence of offense, conviction, sentence, and imprisonment.
The result reached in Conley does not appear to have been required by the wording of the statute then in effect. More important, however, is the fact that any reason to continue that approach disappeared when a new habitual-offender law took effect on July 1, 1978. 1976 Iowa Acts ch. 1245(3), § 208 (effective January 1, 1978). That law, referred to in the majority opinion, provided "[a]n habitual offender is any person convicted of a class `C' or class `D' felony, who has twice before been convicted of any felony. . . ." Iowa Code § 902.8 (1981). The language of this statute left no room for an interpretation imposing the conditions that Conley had fostered. Moreover, we have recognized that a material modification of a statute gives rise to a presumption that a change in the law was intended. State v. Truesdell, 679 N.W.2d 611, 617 (Iowa 2004); Midwest Auto. III LLC v. Iowa Dep't of Transp., 646 N.W.2d 417, 425 (Iowa 2002). This presumption is enhanced when the amendment follows a contrary judicial interpretation of the prior statute. Truesdell, 679 N.W.2d at 617.
Hollins was decided after this amendment. Rather than adhering to this settled rule of interpretation and recognizing that the legislature intended to reverse the result in Conley and its progeny, Hollins continued to require that each prior offense must be complete as to both perpetration and conviction before the commission of the next in order to produce an enlarged punishment for a third offense. That was a misreading of the legislative intent accompanying the changes that had been made in the law.
We should not go where our interpretations of the habitual-offender statutes appear to lead in interpreting Iowa Code section 124.401(5). Rather, we should interpret that statute in a manner consistent with its plain meaning and affirm the judgment of the district court.
LARSON, J., joins this dissent.
NOTES
[1]  All citations are to the 2003 Code of Iowa unless otherwise noted.
[2]  Subsequent to the 1998 amendment to section 124.401(5), we determined that the legislature exercised its authority to exclude the application of the rule in OWI cases by explicitly stating in the OWI penalty statute "`[e]ach previous violation shall be considered a separate previous offense.'" Spoonemore, 598 N.W.2d at 312 (alteration in original).
