
569 N.W.2d 130 (1997)
STATE of Iowa, Appellee,
v.
John Charles MOORE, Appellant.
No. 96-2126.
Supreme Court of Iowa.
September 17, 1997.
Mark O. Lambert, West Des Moines, for appellant.
Thomas J. Miller, Attorney General, Susan M. Crawford, Assistant Attorney General, and J. Patrick White, County Attorney, for appellee.
Considered by HARRIS, P.J., and CARTER, ANDREASEN, TERNUS, and SCHULTZ,[*] JJ.
ANDREASEN, Justice.
In this case, we must determine if a deferred judgment that had been expunged under Iowa Code section 907.9 (1995) must be considered a prior plea or verdict of guilty under Iowa Code section 321J.4. The trial court concluded it must be so considered and ordered the defendant's motor vehicle license be revoked for six years. On appeal, we affirm.
In 1980, John Charles Moore was charged with operating a motor vehicle while intoxicated in violation of Iowa Code section 321.281 (1979). He pled guilty and the court entered a deferred judgment. Moore successfully completed the terms of the deferred judgment and his record was expunged pursuant to Iowa Code section 907.9. In 1982, Moore was again charged with operating a motor vehicle while intoxicated. He pled guilty to the charge and a judgment of conviction was entered.
*131 Moore avoided any further driving-related problems until 1996 when he was again charged with operating while under the influence in violation of section 321J.2 (1995). He pled guilty to the charge and judgment was entered against him. At his sentencing hearing, the district court, as a part of his sentence, ordered the revocation of his license for a period of six years. Moore appeals from that portion of the sentence revoking his license for six years. Our review of a district court's application of a statute is for correction of errors at law. State v. Rodgers, 560 N.W.2d 585, 586 (Iowa 1997).
Iowa Code section 321J.4(3)(a) requires that "[u]pon a plea or verdict of guilty of a third or subsequent violation of section 321J.2, the court shall order the department to revoke the defendant's motor vehicle license... for a period of six years." Moore argues the deferred judgment cannot be considered when determining whether he has a third "plea or verdict of guilty" since the record has been expunged. He urges the effect of the expungement is to make the deferred judgment as if it never occurred. As a result, Moore claims he only has a plea of guilty of a second violation. In support of his position, Moore relies on our holding in State v. Simmons, 500 N.W.2d 58 (Iowa 1993).
Simmons involved a defendant who was charged with second-offense public intoxication in violation of Iowa Code sections 123.46(2) and .91 (1991). The defendant argued his first conviction of public intoxication could not be used to enhance the penalty of the second offense because the record of the first had been expunged. Simmons, 500 N.W.2d at 59. In Simmons we construed the language of Iowa Code section 123.46(4). This subsection provides:
4. Upon the expiration of two years following conviction for a violation of this section, a person may petition the court to exonerate the person of the conviction, and if the person has had no other criminal convictions, other than simple misdemeanor violations of chapter 321 during the two-year period, the person shall be deemed exonerated of the offense as a matter of law. The court shall enter an order exonerating the person of the conviction, and ordering that the record of the conviction be expunged by the clerk of the district court.
We found the exoneration of a previous offense under this section is effective to prevent enhancement of the penalty of the subsequent offense if the exoneration is received prior to the conviction. Simmons, 500 N.W.2d at 60.
Here, Moore urges his 1980 guilty plea was expunged under the provisions of Iowa Code section 907.9 (1995) after his discharge from probation following the entry of the deferred judgment. This statutory provision provides:
Upon discharge from probation, if judgment has been deferred under section 907.3, the court's criminal record with reference to the deferred judgment shall be expunged. The record maintained by the state court administrator as required by section 907.4 shall not be expunged.
Id. § 907.9.
We must determine if the provisions of section 321J.4 require the district court to consider a guilty plea or conviction resulting in a deferred judgment that has been expunged under section 907.9. We will first consider the language of section 907.9 in determining the legislative intent. It is clear the legislature did not intend to expunge all records of a deferred judgment and did not exonerate the person of the conviction. A deferred judgment under section 907.3 must be reported to the state court administrator. Id. § 907.4. The record maintained by the state court administrator of the deferred judgment includes the name and date of birth of the defendant, the district court docket number, the nature of the offense, and the date of the deferred judgment. Implicit in the permanent record kept by the state court administrator is the existence of a plea or verdict of guilty. If there had been no plea or verdict of guilty, a deferred judgment never would have been entered. The legislature intended that the expungement of the deferred judgment would render the record unavailable to the general public. However, the legislature also clearly intended the record of deferred judgments maintained by *132 the court administrator would be available to the supreme court, judges, magistrates, and county attorneys.
When construing a statute, we look at the object sought to be accomplished and the evils and mischief sought to be remedied to arrive at an interpretation that will accomplish the intended purpose rather than one which will defeat it. Thompson v. State, 524 N.W.2d 160, 162 (Iowa 1994). The purpose of the license revocation provision in section 321J.4 is "to protect the public by providing that drivers who have demonstrated a pattern of driving while intoxicated be removed from the highways." State v. Blood, 360 N.W.2d 820, 822 (Iowa 1985); see also State v. Soppe, 374 N.W.2d 649, 653 n. 4 (Iowa 1985). Obviously, a guilty plea to operating while intoxicated is evidence of a defendant's pattern of driving.
Iowa Code section 321J.4(3)(a) does not give the court discretion when sentencing a person with three pleas or verdicts of guilty. If the individual has three or more, the court must order the department of motor vehicles to revoke their driver's license for six years. State v. Pettit, 360 N.W.2d 833, 836 (Iowa 1985). Moore has two guilty pleas resulting in judgments of conviction and one guilty plea resulting in a deferred judgment. The district court correctly ordered the department to revoke Moore's motor vehicle license for a period of six years.
AFFIRMED.
NOTES
[*]  Senior judge assigned by order pursuant to Iowa Code section 602.9206 (1997).
