
823 P.2d 921 (1991)
113 N.M. 121
STATE of New Mexico, Plaintiff-Appellee,
v.
Taylor RUSSELL, Defendant-Appellant.
No. 12715.
Court of Appeals of New Mexico.
October 31, 1991.
*922 Tom Udall, Atty. Gen., Margaret B. Alcock, Asst. Atty. Gen., Santa Fe, for plaintiff-appellee.
Robert H. Graham, Farmington, for defendant-appellant.

OPINION
MINZNER, Judge.
Defendant appeals his sentence for driving while under the influence of intoxicating liquor (DWI) as a fourth conviction under NMSA 1978, Section 66-8-102(E) (Cum.Supp. 1990). A district court jury convicted defendant under Section 66-8-102 for an incident that occurred on March 25, 1990. At the sentencing hearing, defendant conceded that on three separate occasions in 1983 he pled guilty and was convicted of driving while intoxicated, contrary to a Farmington municipal ordinance. However, defendant argued that the municipal court convictions could not be used to enhance his sentence under the state statute. The district court considered the conviction a fourth conviction under the statute and sentenced defendant to the mandatory six month jail term followed by six months of probation provided for a "fourth and subsequent conviction." See § 66-8-102(E)(2).
While this case was pending on appeal, defendant twice moved for release from incarceration pending disposition of his appeal. The motion was denied while the case remained assigned to the summary calendar. After the case was assigned to the general calendar, defendant renewed his motion, and following a telephonic oral argument before a panel of this court, the case was remanded for an evidentiary hearing on the question of whether defendant was entitled to release pursuant to NMSA 1978, Section 31-11-1(C) (Cum.Supp. 1990). After the evidentiary hearing, defendant was released subject to conditions imposed by the district court. At that time, defendant had served six months in the San Juan County Detention Center.
Although defendant has raised five points on appeal, in effect he makes two claims of reversible error: (1) the prior convictions on which the district court relied were uncounseled convictions in which defendant had not voluntarily, knowingly, and intelligently waived his right to counsel, and (2) Section 66-8-102 does not provide for the use of prior convictions under a municipal ordinance to enhance a later conviction under the statute. We conclude the prior convictions were valid. Further, after examining the history of Section 66-8-102 and its apparent purpose, we believe there is sufficient textual support within Section 66-8-102 and in the definitions provided under the Motor Vehicle Code, see NMSA 1978, §§ 66-1-1 and -4 (Repl.Pamp. 1989), to permit us to conclude that the legislature intended both district and magistrate courts to recognize a conviction under a prior municipal court ordinance in distinguishing a first offender from a subsequent offender. We are not persuaded, however, that the legislature's purpose in providing a mandatory jail sentence for a fourth or subsequent offense requires that Subsection E(2) be construed to require a mandatory six-month term of imprisonment on these facts, and we think there is insufficient support in the text of Section 66-8-102 or elsewhere to justify such a construction.
Therefore, we reverse and remand for resentencing. On remand, the district court may take into account the existence of the three prior convictions under municipal court ordinance in deciding what sentence would be appropriate.

I.
As defendant correctly points out, prior uncounseled convictions cannot be used to enhance a sentence unless the defendant *923 voluntarily, knowingly, and intelligently waived the right to counsel in the prior case. See State v. Watchman, 111 N.M. 727, 809 P.2d 641 (Ct.App. 1991). Defendant concedes that he has three prior convictions in municipal court for DWI, and the state concedes that he did not have counsel when he pled guilty in each of those proceedings. Defendant further concedes that he signed waivers of counsel in those instances. However, defendant argues that, because of his fourth grade reading level, he could not read the waiver forms that were written at a twelfth grade level, and thus he could not voluntarily, knowingly, and intelligently waive his right to counsel.
A knowing and intelligent waiver depends on the facts and circumstances of each case. Smith v. Maldonado, 103 N.M. 570, 711 P.2d 15 (1985). The judge is required to thoroughly question the defendant to determine if the waiver is valid. Id. The inquiry is necessarily focused on the defendant's understanding. Id. Based on the testimony in this case, the district court could properly conclude that defendant's waivers of counsel were valid.
Defendant appeared before the same municipal court judge in each of defendant's prior DWI cases. At trial, that judge detailed his procedure for reviewing the waiver of counsel form with defendants who pled guilty and his method of determining whether an individual defendant is making a voluntary, knowing, and intelligent waiver of counsel.
Defendant's expert witness indicated that she believed the procedure used was adequate to ensure defendant's understanding of the waiver form. Indeed, she testified it is the same procedure she uses to ensure her clients understand the documents she gives them to read during her testing procedures.
Defendant emphasizes that the municipal court judge never specifically stated that he followed his procedure with defendant. In fact, the judge acknowledged that he did not remember defendant ever appearing before him. Nevertheless, the judge testified that he followed the same procedure in every case.
This testimony supports a determination that defendant had in fact been questioned prior to waiving counsel and pleading guilty in each of the prior convictions. See SCRA 1986, 11-406 (evidence of habit or routine practice admissible to provide conduct on a particular occasion was in conformity with the habit or practice). Moreover, based on the expert witness's testimony that the questioning was sufficient to ensure that defendant understood what he was doing, the district court could properly conclude there were valid waivers of counsel in the past proceedings.
Accordingly, assuming that Section 66-8-102 permits consideration of municipal ordinance convictions for enhancement purposes, the district court could consider each of these convictions. See State v. Watchman. We next address whether Section 66-8-102 permitted the court to consider municipal court convictions and, if so, whether defendant's sentence was proper.

II.
Section 66-8-102(E) provides in relevant part that "[a] second or subsequent conviction under this section shall be punished ... by imprisonment for not less than ninety days or more than one year[.]" Id. (emphasis added). Section 66-8-102(D) provides in relevant part that "[e]very person under first conviction under this section shall be punished ... by imprisonment for not less than thirty days or more than ninety days or by a fine of not less than three hundred dollars ... or more than five hundred dollars ... or both[.]" Id. (emphasis added). Section 66-8-102(E)(1) provides a mandatory two-day jail term for a second or third conviction occurring within five years of a prior conviction. Subsection E(2) provides a mandatory six-month jail term for a fourth or subsequent conviction.[1]
*924 Defendant points out that all of his prior DWI convictions were under a Farmington municipal ordinance. Since he has never been convicted of DWI under Section 66-8-102, he argues that his present conviction cannot be considered a subsequent conviction under it. His argument is premised on the view that the statute is clear and under its terms, strictly construed, he should have been sentenced for a first conviction under Subsection D. "Statutes authorizing a more severe punishment as conviction for a second offense are deemed highly penal and therefore must be strictly construed." State v. Keith, 102 N.M. 462, 465, 697 P.2d 145, 148 (Ct.App. 1985). Alternatively, defendant contends that if the statute is not clear and therefore not to be strictly construed, the legislature's intent is unclear, and we should resolve the issue on appeal in favor of the rule of lenity. "Doubts about the construction of criminal statutes are resolved in favor of the rule of lenity." Id.; see also State v. Bybee, 109 N.M. 44, 46, 781 P.2d 316, 318 (Ct.App. 1989); cf. State v. Edmondson, 112 N.M. 654, 818 P.2d 855 (Ct.App. 1991) (discussing rule of lenity in connection with sentencing as a habitual offender).
Defendant's primary argument is based on reading Section 66-8-102(D) in isolation. This we decline to do.
The usual rules of statutory construction would require us to read the words in context and to include in the relevant context as much of the statute as is necessary to understand the legislature's purpose. See State v. Sinyard, 100 N.M. 694, 675 P.2d 426 (Ct.App. 1983). In construing a statute, it must be read as a whole; "[e]ach section or part should be construed in connection with every other part or section so as to produce harmonious whole, ... and the court is to give effect to all provisions of a statute and to reconcile different provisions so as to make them consistent." Id. at 697, 675 P.2d at 429 (citations omitted).
The term "under this section" appears within Section 66-8-102, which now has ten subsections, twelve times.[2] One of the subsections within Section 66-8-102 specifically attempts to define the phrase "conviction under this section," see § 66-8-102(F), and the district court relied on that subsection. We therefore consider that subsection in addressing the question of what the legislature intended.
Section 66-8-102(F) provides as follows:
In the case of a first offense under this section, the magistrate court has concurrent jurisdiction with district courts to try the offender. This section does not affect the authority of a municipality under a proper ordinance to prescribe penalties for driving while under the influence of intoxicating liquor or drugs. A conviction under a municipal ordinance prescribing penalties for driving while under the influence of intoxicating liquor or drugs shall be deemed to be a conviction under this section for purposes of determining whether a conviction in magistrate court is a second conviction. [Emphasis added.]
It is not entirely clear from the words used in Subsection F what the legislature intended the third sentence to accomplish.[3] The magistrate court now has jurisdiction in all cases of misdemeanors and petty misdemeanors. See NMSA 1978, § 35-3-4(A) (Repl.Supp. 1988). There does not seem to be any jurisdictional barrier to a magistrate court sentencing under either *925 Subsection D or E.[4]
Thus, the first sentence of Subsection F should not be understood as limiting magistrate court jurisdiction. Cf. State v. Rue, 72 N.M. 212, 382 P.2d 697 (1963) (general statute authorizing justice of the peace to exercise jurisdiction over certain misdemeanors did not repeal justice of the peace jurisdiction over first offenses in cases of driving vehicle while intoxicated); see generally AG Op. No. 75-45 (1975) (surveying history of first sentence of Subsection F; sentence preceded enlargement of magistrate court jurisdiction under general jurisdictional statute). Rather, it appears that Section 35-3-4(A) is a general jurisdictional statute in which the legislature gradually expanded the jurisdiction of the magistrate courts, and eventually the changes in the general jurisdictional statute made the first sentence of Subsection F surplusage. Compare 1973 N.M. Laws, ch. 206, § 2 (expanding magistrate court jurisdiction to all misdemeanors) with 1968 N.M. Laws, ch. 62, § 49 (expanding magistrate court jurisdiction in all cases of misdemeanors where punishment is fine of $100 or less or imprisonment for six months or less or both).
When the legislature expanded the magistrate courts' jurisdiction by amending Section 35-3-4(A) to include all misdemeanors, it must have envisioned that the magistrate courts and district courts would be called upon to exercise the new, concurrent jurisdiction in a manner that promoted judicial economy and served the ends of justice. We cannot imagine any legislative purpose that would be served by giving one set of courts different sentencing authority over the same offense than has been given to another set of courts with concurrent jurisdiction. Under these circumstances, we think we must take into account the legislative expansion of magistrate court jurisdiction in Section 35-3-4(A) in trying to understand the legislature's purpose in enacting the third sentence of Subsection F.
Surely the third sentence of Subsection F can be read to provide that when a person has a prior conviction under either Section 66-8-102 or a municipal ordinance prohibiting driving while under the influence, the magistrate court judge should sentence that person for a later offense under Subsection E. We note that the third sentence of Subsection F was added in 1979, after the expansion of magistrate court jurisdiction in Section 35-3-4(A). See 1979 N.M. Laws, ch. 71, § 7. At this time, the sentence was part of a single provision, Section 66-8-102(C), that distinguished a "first conviction" from "a second or subsequent conviction."
Further, we think the legislature has made its intent to distinguish first and subsequent offenders clear,[5] and, by defining a "subsequent offender" as one who has a prior conviction under any domestic law prohibiting driving while intoxicated and a "first offender" as one who has no such prior history, has indicated its intent that a defendant with a prior conviction under a municipal ordinance be treated as a subsequent offender. We note that although the legislature defined "first offender" and *926 "subsequent offender" effective July 1, 1990, after the date of the incident for which defendant was convicted in district court, it had previously defined both terms with similar language effective July 1, 1988, a date prior to that incident.[6] It would make no sense to have the sentence for a second offense depend on which court tried the defendant. We will not construe the statute to reach an absurd result. Cf. State v. Candelaria, 113 N.M. 288, 825 P.2d 221 (Ct.App. 1991) (construing district court's authority to place a defendant convicted of a misdemeanor on probation consistent with authority of metropolitan or magistrate court). Therefore, we conclude the legislature intended that a person convicted of a municipal court ordinance would be treated as having a prior offense under Section 66-8-102 for purposes of sentencing on a later conviction under that section, whether he or she is tried for the later offense in magistrate court or district court. Id.
The next question is whether the district court was required to sentence defendant for a fourth conviction. The third sentence of Subsection F, on which the trial court relied, expressly refers only to treating a conviction under a municipal court ordinance as a second conviction. Although Subsection E refers to a "third conviction" and to a "fourth conviction" without qualification, the most recent amendment, which added those references, was enacted by the same legislature that first defined "subsequent offender" and "first offender," and that legislature failed to say, although it would have been easy to do, whether convictions under a municipal court ordinance should be counted other than for purposes of distinguishing a first offender from a subsequent offender. For a second or subsequent conviction the district court has discretion to sentence the offender for a period of imprisonment up to one year. Thus, we need not construe the statute by adding words to it in order to permit the district court to take into account prior municipal court convictions in deciding how long a term of imprisonment is appropriate.
We recognized in State v. Greyeyes, 105 N.M. 549, 553, 734 P.2d 789, 793 (Ct.App. 1987) (quoting Burch v. Foy, 62 N.M. 219, 223, 308 P.2d 199, 202 (1957)), that:
"A statute must be read and given effect as it is written by the Legislature, not as the court may think it should be or would have been written if the Legislature had envisaged all the problems and complications which might arise in the course of its administration... . Courts must take the act as they find it and construe it according to the plain meaning of the language employed."
In this case, neither the text nor the statutory purpose makes the legislature's intent with regard to a third or fourth conviction clear.[7] Therefore, we are not certain that the legislature intended that each conviction under a municipal court ordinance would be treated as an offense under Section 66-8-102 for purposes of the most recent amendment, which imposed a mandatory jail sentence not to be suspended, deferred, or taken under advisement for a fourth or subsequent conviction. See 1988 N.M. Laws, ch. 56, § 8. Under these circumstances, Section 66-8-102(E)(2) does not provide a sufficiently clear expression of legislative intent to permit us to conclude that the district court was required to sentence defendant to six months in jail. See State v. Bybee; State v. Keith; cf. State v. Edmondson.
We conclude that defendant should have been sentenced as having a second conviction "under this section." Because all three municipal court convictions were more than five years prior to the incident for which defendant was convicted in district court, however, the court was not required to sentence defendant to any time *927 in jail. Rather, the court had discretion to require defendant to serve as much as one year in prison or in jail. The record indicates that the district court judge believed he was required to sentence defendant to six months as a fourth offender. Therefore, we reverse and remand with instructions to vacate defendant's sentence and resentence him for a second conviction under Section 66-8-102(E).

CONCLUSION.
Defendant's sentence is reversed, and the case is remanded to the district court for resentencing. Defendant should be resentenced as a second offender pursuant to Section 66-8-102(E).
IT IS SO ORDERED.
BIVINS, J., concurs.
CHAVEZ, J., dissents.
CHAVEZ, Judge (dissenting).
I respectfully dissent. I agree with the majority opinion on the issue that the prior convictions on which the district court relied were valid convictions, but I disagree that NMSA 1978, Section 66-8-102 (Cum. Supp. 1990) permits consideration of municipal ordinance convictions for enhancement purposes. Therefore, I believe that the district court erred in considering these convictions in enhancing defendant's sentence.
This case requires us to interpret the meaning of Section 66-8-102(E). The pertinent portion of that section provides in part that "[a] second or subsequent conviction under this section shall be punished ... by imprisonment for not less than ninety days or more than one year... ." Id. (emphasis added). All of defendant's prior DWI convictions were under a Farmington municipal ordinance. Since he has never been convicted of DWI under Section 66-8-102, his present conviction cannot be considered a subsequent conviction under the section.
"Statutes authorizing a more severe punishment as conviction for a second offense are deemed highly penal and therefore must be strictly construed." State v. Keith, 102 N.M. 462, 465, 697 P.2d 145, 148 (Ct.App. 1985). "Doubts about the construction of criminal statutes are resolved in favor of the rule of lenity." Id.; see also State v. Bybee, 109 N.M. 44, 46, 781 P.2d 316, 318 (Ct.App. 1989). This court recently reaffirmed its policy of strictly construing criminal statutes in State v. Leiding, 112 N.M. 143, 812 P.2d 797 (Ct. App. 1991). A strict construction of Section 66-8-102 mandates that defendant's conviction be considered a first conviction under the state statute for sentencing purposes.
The plain words of Section 66-8-102(E) provide for enhanced punishment if the conviction is a second or subsequent conviction under that section. Section 66-8-102(E) does not provide for enhanced punishment if prior convictions were obtained under municipal ordinances. Other sections of the Motor Vehicle Code demonstrate that the legislature will expressly include local ordinance convictions within a statutory scheme if it chooses to do so. See NMSA 1978, §§ 66-5-29 & -35 (Repl. Pamp. 1989). Because defendant's prior convictions were secured pursuant to a Farmington municipal ordinance and not the state DWI statute, defendant should only be sentenced for a first conviction under Section 66-8-102(D).
The majority points out that the trial court considered the municipal ordinance convictions prior convictions under the state statute based on Section 66-8-102(F). The portion relied upon by the majority provides that "[a] conviction under a municipal ordinance prescribing penalties for driving while under the influence of intoxicating liquor or drugs shall be deemed to be a conviction under this section for purposes of determining whether a conviction in magistrate court is a second conviction." Id. (emphasis added). The state argues, and the majority agrees, that although only magistrate courts are mentioned in the subsection, since district courts have concurrent jurisdiction with magistrate courts, the statute should be read to encompass district courts as well. Moreover, the trial court ruled that although the quoted language only specifies that municipal ordinance convictions can be used to enhance a second conviction, such a *928 reading is too limited. The trial court believed the language in Subsection F should be construed to allow enhancement up to a fourth or subsequent conviction, as was done in this case.
I understand that the trial court was confronted with the difficult task of reconciling the limited language of Section 66-8-102(F) with the statute's overall purpose of preventing drunk driving anywhere in the state. See § 66-8-102(A). However, I believe adopting the construction used by the majority would require us to change the language enacted by the legislature. As our supreme court has stated in the past, we will not change the wording in a criminal statute so that it can be construed against the accused. See State v. Collins, 80 N.M. 499, 502, 458 P.2d 225 228 (1969).
We recognized in State v. Greyeyes, 105 N.M. 549, 553, 734 P.2d 789, 793 (Ct.App. 1987) (quoting Burch v. Foy, 62 N.M. 219, 223, 308 P.2d 199, 202 (1957)), that:
"A statute must be read and given effect as it is written by the Legislature, not as the court may think it should be or would have been written if the Legislature had envisaged all the problems and complications which might arise in the course of its administration... . Courts must take the act as they find it and construe it according to the plain meaning of the language employed."
As we said in Greyeyes, we may not invade the legislature's province to enlarge the penalty for violation of an offense. Id.
The state argues it does not make sense to allow a prosecutor the discretion of securing a greater punishment by filing all DWI charges in magistrate court rather than district court. Whether the state's concerns are valid, complaints about the "inadequacy of legislation to reach the result desired by the State must ... be addressed to the legislature, not the courts." See State v. Garcia, 98 N.M. 585, 589, 651 P.2d 120, 124 (Ct.App. 1982). "Where the state seeks to broaden the application of the statute beyond the plain wording of the act, the appropriate remedy, however, involves `legislative therapy and not judicial surgery.'" See State v. Gardner, 112 N.M. 280, 814 P.2d 458 (Ct.App. 1991) (quoting City of Albuquerque v. Sanchez, 81 N.M. 272, 273, 466 P.2d 118, 119 (Ct.App. 1970), overruled on other grounds, State v. Ball, 104 N.M. 176, 718 P.2d 686 (1986)).
Defendant mentions in his reply brief that the definition of a "subsequent offender" in NMSA 1978, Section 66-1-4.16(Q) (Cum.Supp. 1990), may be construed to indicate that the legislature intended municipal court convictions to be considered prior convictions under Section 66-8-102. However, defendant argues that Section 66-1-4.16(Q) did not go into effect until after defendant was arrested for DWI, and is therefore inapplicable to this case. Although the state has not argued this point, we must point out that the language in Section 66-1-4.16(Q) was in effect at the time of defendant's arrest under NMSA 1978, Section 66-1-4(B)(64) (Repl.Pamp. 1989). Nevertheless, I do not believe the definition of a "subsequent offender" found in Section 66-1-4(B)(64) or Section 66-1-4.16(Q) warrants treating defendant's current conviction as a fourth conviction under Section 66-8-102(E).
Although a subsequent offender is defined as someone who has been adjudicated guilty of DWI under a state statute, federal law, or municipal ordinance, the precise term "subsequent offender" only appears in the Motor Vehicle Code for license revocation proceedings. See NMSA 1978, §§ 66-5-23, -29, -35 (Repl.Pamp. 1989); NMSA 1978, § 66-8-135 (Repl.Pamp. 1987). The legislature could have easily used the term "subsequent offender" in Section 66-8-102, but it did not. Aside from the limited use of municipal ordinance convictions allowed by Section 66-8-102(F), the narrow use of the term "subsequent offender" appears to indicate a legislative intent to limit the use of municipal ordinance convictions to enhancing license revocation penalties rather than more severe criminal penalties.
For the foregoing reasons, I would reverse and remand this case with instructions to vacate defendant's sentence and resentence him for a first conviction consistent *929 with the provisions of Section 66-8-102(D).
NOTES
[1]  Section 66-8-102 as it read prior to its most recent amendment only distinguished first offenses from second and subsequent offenses. See NMSA 1978, § 66-8-102(D), (E), (F) (Repl. Pamp. 1987). Until the 1988 amendment, the mandatory two-day jail term now available for either certain second or a third conviction was required for certain second or subsequent convictions.
[2]  See § 66-8-102(D) (twice); § 66-8-102(E) (once); § 66-8-102(F) (twice); § 66-8-102(G) (twice); § 66-8-102(H) (once); § 66-8-102(I) (three times); § 66-8-102(J) (once).
[3]  Perhaps the legislature meant to refer to convictions under a municipal court ordinance tried in magistrate court pursuant to NMSA 1978, Section 35-3-4(B) (Repl.Supp. 1988), but the language of the third sentence of Subsection F is not so limited. Further, we cannot think of a reason why the legislature would have distinguished municipal court ordinance violations tried in magistrate court from those tried in municipal court.
[4]  Under the Motor Vehicle Code, it is a misdemeanor for any person to violate any provision of the Code unless the provision is declared a felony. See NMSA 1978, § 66-8-7(A) (Cum. Supp. 1990). Under the Motor Vehicle Code, unless another penalty is specified, the penalty for a misdemeanor is a fine of not more than $300 or by imprisonment for not more than ninety days or both. See § 66-8-7(B). Thus, the penalty available under Subsection D is the penalty generally assigned a misdemeanor under the Motor Vehicle Code, while the penalty available under Subsection E is "another penalty specified," which is consistent with the penalty generally assigned misdemeanors under the Criminal Code. See NMSA 1978, § 31-19-1(A) (Repl.Pamp. 1990); see also NMSA 1978, § 30-1-1 (Repl.Pamp. 1984).
[5]  Compare NMSA 1978, § 66-1-4.16(Q) (Supp. 1990) ("subsequent offender" defined as a person who was "previously a first offender and who again, under state law, federal law or municipal ordinance, has been adjudicated guilty of the charge of driving a motor vehicle while under the influence of intoxicating liquor") and NMSA 1978, § 66-1-4(64) (Repl.Pamp. 1989) (same) with NMSA 1978, §§ 66-5-23, -29, -35 (Repl.Pamp. 1989) and NMSA 1978, § 66-8-135 (Cum.Supp. 1990) (in each of which the term "subsequent offender" appears); see also NMSA 1978, § 66-1-4.6 (Supp. 1990) (defining "first offender"); § 66-1-4(22) (Repl.Pamp. 1989) (same).
[6]  See 1988 N.M. Laws, ch. 56, §§ 2, 10.
[7]  Prior to its most recent amendment, Section 66-8-102(E) provided a mandatory two-day jail term for a "second or subsequent conviction occurring within five years of a prior conviction." Id. "Subsequent offender," however, was not defined until 1988, at which time the word "third" was substituted for "subsequent" in describing the convictions for which the two-day jail term was mandatory.
