
666 N.W.2d 608 (2003)
STATE of Iowa, Appellant,
v.
Matthew Dale RANKIN, Appellee.
No. 02-1577.
Supreme Court of Iowa.
July 16, 2003.
Thomas J. Miller, Attorney General, Karen Doland, Assistant Attorney General, for appellant.
*609 R. William Petersen and William L. Shelton, Chariton, for appellee.
LAVORATO, Chief Justice.
The State appeals from the district court's ruling on the defendant Matthew Dale Rankin's motion to dismiss. The State contends the district court erred by interpreting Iowa Code section 124.401(5) (2001) and ruling that Rankin should have been charged with a serious rather than an aggravated misdemeanor. We agree and reverse and remand.

I. Background Facts and Proceedings.
On June 28, 2002, Rankin was convicted of possession with intent to deliver marijuana in violation of Iowa Code section 124.401(1)(d) and 124.410 (2001). His conviction was determined to be an accommodation offense under section 124.410.
Two days later, a police officer stopped the car in which Rankin was a passenger for a traffic violation. According to the officer, as he approached the car he was "hit with a large amount of burnt marijuana smoke coming from inside the vehicle." Rankin was trying to brush smoking ashes off his lap. The officer found a marijuana cigarette in the car and residue all over the passenger seat where Rankin was sitting.
The State charged Rankin with possession of marijuana in violation of Iowa Code section 124.401(5). The State also alleged that Rankin had previously been convicted of possession with intent to deliver on June 28, 2002, making the current offense an aggravated misdemeanor.
Rankin moved to dismiss. In his motion, Rankin asserted that no basis existed to charge him with the enhanced offense under section 124.401(5).
Following a hearing on the motion, the district court determined that the punishment would be that provided for a serious misdemeanor.
The State appealed, contending that the district court erred by interpreting section 124.401(5) and ruling that Rankin should have been charged with a serious rather than an aggravated misdemeanor. For reasons that follow, we agree.

II. Scope of Review.
We review issues of statutory interpretation for errors at law. State v. Snyder, 634 N.W.2d 613, 615 (Iowa 2001).

III. Analysis.
We first begin our analysis with the fundamental rules of statutory interpretation that guide our resolution of the issue before us:
[In interpreting statutes] [o]ur goal ... is to discover the true intention of the legislature. In searching for legislative intent, we consider not only the language of the statute, but also its subject matter, the object sought to be accomplished, the purpose to be served, underlying policies, remedies provided, and the consequences of various interpretations. Additionally, we construe a statute in a way that would avoid impractical or absurd results. And we look at the whole statute, not just separate parts.
State v. Albrecht, 657 N.W.2d 474, 479 (Iowa 2003) (citations omitted).
Rankin contends the district court was correct. In support of the district court's ruling, Rankin argues, as he did in the district court, that at the time of the first conviction he was sentenced pursuant to section 124.410, as though he had been convicted of possession of marijuana. Therefore, according to Rankin, the second paragraph of section 124.401(5) applied *610 and the charge for a second offense should have been a serious misdemeanor rather than an aggravated misdemeanor under section 124.401(5). (An aggravated misdemeanor carries a sentence not to exceed two years (Iowa Code section 903.1(2)) and a serious misdemeanor under section 124.401(5) carries a sentence not to exceed six months for the first offense and not to exceed one year for a second offense under Iowa Code section 903.1(1)(b).)
To understand Rankin's argument, we first set out Iowa Code section 124.410, the provision under which he was sentenced for his first conviction:
In a prosecution for unlawful delivery or possession with intent to deliver marijuana, if the prosecution proves that the defendant violated the provisions of section 124.401, subsection 1, by proving that the defendant delivered or possessed with intent to deliver one-half ounce or less of marijuana which was not offered for sale, the defendant is guilty of an accommodation offense and rather than being sentenced as if convicted for a violation of section 124.401, subsection 1, paragraph "d", shall be sentenced as if convicted of a violation of section 124.401, subsection 5....

Iowa Code § 124.410 (emphasis added).
The second paragraph of section 124.401(5)that part of the statute that Rankin claims appliesprovides:
If the controlled substance is marijuana and the person has been previously convicted of a violation of this subsection in which the controlled substance was marijuana, the punishment shall be as provided in section 903.1, subsection 1, paragraph "b" [serious misdemeanor].
Iowa Code § 124.401(5) (emphasis added).
Reading these two provisions together as we must, we conclude, contrary to Rankin's contention, that he was not "convicted of" a violation of section 124.401(5) when he was sentenced under section 124.410 for his first offense. By the language "shall be sentenced as if convicted of a violation of" section 124.401(5), the legislature simply intended that section 124.401(5) should only serve to supply the sentencing court with the proper sentence for a defendant found guilty of accommodation. A defendant found guilty of accommodation is not "convicted of" a violation of section 124.401(5). Rather such a defendant is convicted of accommodationa delivery offense under section 124.410. See State v. Metcalf, 260 N.W.2d 857, 860 (Iowa 1977) (holding that accommodation is a lesser included offense of possession with intent to deliver); Iowa Code § 124.410 ("An accommodation offense may be proved as an included offense under a charge of delivering or possessing with the intent to deliver marijuana in violation of section 124.401, subsection 1.").
We agree with the State that the second paragraph of section 124.401(5) does not apply to Rankin for two reasons. First, as we just explained, Rankin was not "convicted of" a violation of section 124.401(5) when he was found guilty of an accommodation offense under section 124.410. Second, as the State correctly points out, the second paragraph of section 124.401(5) applies only to those persons convicted of possession of marijuana. Accommodation is a delivery offense; it is not a possession-of-marijuana offense. All of this is borne out by the following language in the second paragraph of section 124.401(5): "If the controlled substance is marijuana and the person has been previously convicted of a violation of this subsection in which the controlled substance was marijuana...." Iowa Code § 124.401(5) (emphasis added). Because Rankin was convicted of an accommodation offense in violation of section 124.410 and not a possession-of-marijuana *611 offense, his previous conviction does not fall within the "this subsection" language of paragraph two of section 124.401(5).
As the State suggests, Rankin's case falls within the following language of section 124.401(5) found in the first paragraph of that provision:
It is unlawful for any person knowingly or intentionally to possess a controlled substance.... Any person who violates this subsection is guilty of a serious misdemeanor for a first offense. A person who commits a violation of this subsection and who has previously been convicted of violating this chapter ... is guilty of an aggravated misdemeanor.

Rankin was previously convicted of violating sections 124.401(d) and 124.410 ("this chapter"). By using the language "this subsection," rather than "this chapter," in the second paragraph of section 124.401(5), the legislature clearly intended to grant leniency only to those charged with possession of marijuana.
We therefore conclude the State properly charged Rankin with an aggravated misdemeanor pursuant to the first paragraph of section 124.401(5). The district court erred in concluding otherwise. We therefore reverse the district court's ruling on Rankin's motion to dismiss and remand for further proceedings consistent with this opinion.
REVERSED AND REMANDED.
All justices concur except CARTER, J., who dissents and STREIT, J., who takes no part.
CARTER, Justice (dissenting).
I respectfully dissent.
The sentencing enhancement provided in the first paragraph of section 124.401(5), although purporting to apply to "any person who violates this subsection," clearly does not apply to a conviction for possession of marijuana. The penalties for that offense, including first-offense and subsequent-offense convictions, are contained in the second paragraph of section 124.401(5). In applying that paragraph, the issue that must be decided is whether a person charged with possession with intent to deliver marijuana under Iowa Code section 124.401(1)(d), but sentenced "as if convicted under Iowa Code section 124.401(5)," because found to be an accommodation offender as provided in section 124.410, should be considered a person previously convicted of a violation of section 124.401(5). I am satisfied that the answer to this question is yes.
The statutory scheme for enhancing sentences imposed under section 124.401(5) is designed to increase the degree of offense by one classification for each prior conviction. Thus, for violations found under the first paragraph of section 124.401(5), involving possession of controlled substances other than marijuana, one prior conviction enhances a sentence from a serious misdemeanor to an aggravated misdemeanor. Two or more prior convictions enhances the sentence from a serious misdemeanor to a felony.
Similarly in the second paragraph of section 124.401(5), governing possession of marijuana, one prior conviction will enhance an offense calling for a prison term of six months to a serious misdemeanor (providing a maximum sentence of twelve months). Two or more prior convictions enhance an offense calling for six months imprisonment to an aggravated misdemeanor.
This defendant's prior sentence was "as if convicted of section 124.401(5)." That sentence was limited to a maximum of six months, the same as provided for defendant's present offense but for the enhancement *612 to be applied as the result of the prior conviction. Yet, the enhancement that the majority endorses, although based on a single prior conviction, increases the penalty by two sentencing classifications rather than one. That is inconsistent with the statutory scheme. I would affirm the judgment of the district court.
