
360 N.W.2d 820 (1985)
STATE of Iowa, Appellee,
v.
Clement Lynn BLOOD, Appellant.
No. 84-582.
Supreme Court of Iowa.
January 16, 1985.
*821 Charles L. Harrington, Appellate Defender, and John P. Messina, Asst. Appellate Defender, Des Moines, for appellant.
Thomas J. Miller, Atty. Gen., Lona Hansen, Asst. Atty. Gen. and Denver D. Dillard, Co. Atty., for appellee.
Considered by UHLENHOPP, P.J., and HARRIS, McCORMICK, McGIVERIN and SCHULTZ, JJ.
SCHULTZ, Justice.
Defendant Clement Lynn Blood appeals the order imposing sentence following his plea of guilty to a charge of operating while intoxicated (OWI), second offense, in violation of Iowa Code section 321.281 (1983). On appeal defendant asserts that the portion of his sentence which ordered revocation of his driver's license for a period of six years pursuant to section 321.281(9)(a) was illegal. We hold that the trial court correctly ordered revocation of defendant's driver's license and affirm.
Defendant pleaded guilty to a charge of operating a motor vehicle while under the influence in violation of section 321.281 as a second offender. When defendant pleaded guilty, he admitted he had pleaded guilty to operating a motor vehicle while intoxicated on two prior occasions, receiving a deferred sentence on one of these violations and a conviction on the other. During the proceedings at which defendant's guilty plea was taken the court informed defendant that upon sentencing it had no choice but to order his driver's license revoked for six years. Defendant replied that he understood and subsequently pleaded guilty to the charge. The court sentenced defendant to be confined in the Linn County jail for a period of seven days and required him to pay the court costs. The order also provided:
Further, pursuant to Iowa Code Sec. 321.281(9a), since this is the third conviction [Although the court used the language "third conviction," it clearly meant third violation.] of a violation of Sec. 321.281, the Court now orders that his licenses or permits to operate motor vehicles be revoked by the Department of Transportation, and that he shall remain ineligible for a new license or permit for a period of six years.
The challenged six-year revocation was ordered pursuant to section 321.281(9)(a) (1983) which states:
Upon a plea or verdict of guilty of a third or subsequent violation of this section, the court in which the plea was entered or the verdict was returned shall order that the defendant's license or permit to operate motor vehicles be revoked by the department and that the defendant shall remain ineligible for a new license or permit for a period of six years. Any license or permit to operate motor vehicles held by the defendant shall be surrendered to the court who shall forward it to the department with a copy of the order for revocation.
Defendant asserts that the revocation mandated by this section upon a "third or subsequent violation" requires a third or subsequent conviction. In State v. Ridout, 346 N.W.2d 837 (Iowa 1984), we held that the term "offense" in subsection 321.281(2)(c), which enhances punishment for a third offense OWI, requires that convictions be obtained in the prior actions and that a deferred judgment is not a "conviction" or an "offense" within the meaning of subsection 321.281(2)(c). Id. at 839-40. Defendant urges that subsection 321.281(9)(a) is also an enhanced punishment statute and that "violation" like "offense" should be interpreted to mean "conviction." Since defendant received a deferred sentence on one of the prior OWI charges, he maintains he has not had three prior "violations" and the court cannot enhance punishment based on the deferred judgment.
*822 Statutory construction is properly invoked when a statute contains such ambiguities or obscurities that reasonable minds may disagree or be uncertain of its meaning. Janson v. Fulton, 162 N.W.2d 438, 443 (Iowa 1968). "The fundamental rule of statutory construction is to ascertain and, if possible, give effect to the intention or purpose of the legislature as expressed in the statute." Hedges v. Conder, 166 N.W.2d 844, 852 (Iowa 1969) (citations omitted).
There is a significant difference in purpose between subsection 321.281(2) and subsection 321.281(9). Subsection 321.281(2) prescribes the punishment for OWI offenses; the penalty is enhanced for a second offense, a third offense, or a subsequent offense within six years. Because the punishment may be enhanced, it is important to establish the number of convictions. Subsection 321.281(9)(a), on the other hand, serves a different purpose. Upon a third or subsequent violation, subsection 321.281(9)(a) triggers a court order directing an administrative agency to revoke the defendant's driving privileges. Such revocation "is not intended as a punishment to the driver, but is designed solely for the protection of the public in the use of the highways." 7A Am.Jur.2d Automobiles and Highway Traffic § 112 (1980). We conclude that the purpose of the legislature in enacting section 321.281(9)(a) was to protect the public by providing that drivers who have demonstrated a pattern of driving while intoxicated be removed from the highways. The peril created by a repeated violator is not lessened by the fact that one of the violations resulted in a deferred judgment. The legislative purpose of subsection 321.281(9)(a) requires that the term "violations" be interpreted to include those previous determinations of guilt that resulted in deferred sentences.
The recent revision of section 321.281 also supports this conclusion. The present version of section 321.281 was enacted in 1982. 1982 Iowa Acts ch. 1167, § 5 (codified at Iowa Code § 321.281 (1983)). Prior to the 1982 revision, section 321.281 provided in unnumbered paragraph three that "[t]he court in pronouncing sentence may provide as to the period during which a new license to operate a motor vehicle shall not be issued to the defendant" and prescribed the minimum period of suspension for conviction of a first offense, a second offense, and a third or subsequent offense. Iowa Code § 321.281 (1981). Thus, the court had additional discretion to set the term of suspension as part of the punishment. When the legislature revised section 321.281 by striking the section and inserting a new one which added subsection 321.281(9)(a), it exhibited a new legislative intent. Subsection 321.281(9)(a) requires the court to order revocation upon a plea or verdict of guilty of a third offense, but does not require that the revocation be a part of the pronouncement of sentencing. In addition, section 321.281 no longer links the period of suspension with conviction of a first offense, a second offense, or a third or subsequent offense. We conclude that these legislative changes evince a clear intent that subsection 321.281(9)(a) not be a sentencing statute which provides guidance for the imposition of a penalty. Instead, subsection 321.281(9)(a) merely requires the court to perform the first step in the civil revocation of a driver's license.
Defendant also objects to the fact that the trial information only alleged one previous OWI offense; yet he was given an enhanced punishment based on a third violation. He asserts that this violated Iowa Rule of Criminal Procedure 6(5).[1] We have *823 rejected defendant's claim that subsection 321.281(9)(a) provides for enhanced penalties. Additionally, rule 6(5) is merely a procedural rule designed to protect defendants by providing procedures which prevent juries from learning about previous convictions during prosecution of the offense. Defendant's plea of guilty waives any procedural defect.
AFFIRMED.
NOTES
[1]  Rule 6(5) provides:

If the offense charged is one for which the defendant, if convicted, will be subject by reason of the Code, to an increased penalty because of prior convictions, the allegation of such convictions, if any, shall be contained in the indictment. A supplemental indictment shall be prepared for the purpose of trial of the facts of the current offense only, and shall satisfy all pertinent requirements of the Code, except that it shall make no mention, directly or indirectly, of the allegation of the prior convictions, and shall be the only indictment read or otherwise presented to the jury prior to conviction of the current offense. The effect of this subdivision shall be to alter the procedure for trying, in one criminal proceeding, the offenses appropriate to its provisions, and not to alter in any manner the basic elements of an offense as provided by law.
