
109 S.W.3d 382 (2002)
STATE of Tennessee
v.
Gary K. HADDON.
Court of Criminal Appeals of Tennessee, at Nashville.
Assigned on Briefs March 13, 2002.
June 5, 2002.
Application for Permission to Appeal Denied November 12, 2002.
*383 Paul G. Summers, Attorney General and Reporter; Elizabeth T. Ryan, Assistant Attorney General; C. Michael Layne, District Attorney General; and Douglas Aaron, Assistant District Attorney General, for the appellant, State of Tennessee.
Robert S. Peters, Winchester, Tennessee, for the appellee, Gary K. Haddon.
Application for Permission to Appeal Denied by Supreme Court November 12, 2002.
Published Pursuant to Supreme Court Rule 4(D).
THOMAS T. WOODALL, J., delivered the opinion of the court, in which JOE G. RILEY and JOHN EVERETT WILLIAMS, JJ., joined.

OPINION
After the Coffee County Grand Jury indicted the Defendant, Gary K. Haddon, for driving under the influence, second offense, Defendant filed a motion to dismiss the indictment for prosecution as a second offender. As the ground for dismissal, Defendant argued that the State failed to provide him with a copy of the department of safety printout at the arraignment, as required by Tenn.Code Ann. § 55-10-403(g)(3)(ii). The Circuit Court of Coffee County granted Defendant's motion. The State appeals. After a review of the record, we reverse the judgment of the trial court.

Background
The record reflects that Defendant was indicted on October 11, 2000, on one count of driving under the influence of an intoxicant ("DUI"), second offense, Tenn.Code Ann. § 55-10-401(a)(1), and one count of *384 driving with a blood alcohol concentration of ten hundredths of one percent (.10%) or more, second offense, Tenn.Code Ann. § 55-10-401(a)(2). At his arraignment on October 17, 2000, Defendant appeared with counsel and pled not guilty to the charges. The case was set for entry of negotiated settlement or for setting of a trial date on November 2, 2000. Neither the record nor the briefs of the parties contain the trial date nor do they state whether a trial date was actually set.
On August 6, 2001, Defendant filed a "Motion to Dismiss Indictment For Prosecution of Second or Subsequent Offender." In his motion, Defendant alleged that the State failed to comply with Tenn.Code Ann. § 55-10-403(g)(3)(ii), which provides, in relevant part, that "following indictment by a grand jury, the defendant shall be given a copy of the department of safety printout at the time of arraignment." Defendant asserted that neither he nor his attorney was given the requisite copy of the printout at the time of arraignment and that he had yet to receive a copy as of the date of the motion. Defendant argued that the statutory requirement was mandatory and, therefore, the State's noncompliance should result in dismissal of Defendant's prosecution as a second or subsequent offender.
The hearing on Defendant's motion occurred on August 24, 2001. After hearing arguments from counsel for both Defendant and the State, the trial judge read the language of Tennessee Code Annotated section 55-10-403(g)(3)(ii), cited by Defendant, and stated the following: "I don't know what my brothers and sisters at the appellate courts are going to say, but as far as I'm concerned, `shall' means `shall,' and I am going to grant [Defendant's] motion." The trial court further stated that the prosecution of Defendant could go forward on the charge of DUI, first offense. Defendant's indictment as a second offender was dismissed in an order filed September 12, 2001.

Analysis
The State, relying upon various cases, and in particular, Stiner v. Powells Valley Hardware Company, 168 Tenn. 99, 75 S.W.2d 406 (1934), argues that the statutory provision requiring that "the defendant shall be given a copy of the department of safety printout [of his driving record] at the time of arraignment" (emphasis added) should be construed as "directory" rather than "mandatory." The State argues that, as such, its failure to comply with the directive should not result in dismissal of that part of the indictment charging Defendant with second offense DUI, and the trial court erred by doing so.
Defendant, on the other hand, argued both in the trial court and in this Court that "shall" in the statute is mandatory. Consequently, Defendant asserts that the trial court properly dismissed that portion of the indictment charging him as a DUI second offender.
Regardless of whether the requirement of Tennessee Code Annotated section 55-10-403(g)(3)(ii) is "mandatory," or "directory," we conclude that the trial court erred by dismissing that portion of the indictment which charges Defendant with being a DUI second offender. No provision in the law justifies dismissalthe relief requested by Defendant and granted by the trial courtand Defendant requested no other relief in his motion.
Tennessee Code Annotated section 55-10-403(g)(3)(ii) cannot be read in isolation. See Owens v. State, 908 S.W.2d 923, 926 (Tenn.1995). Instead, it must be read in context with all of the provisions of Tennessee Code Annotated section 55-10-403(g)(3), which provide as follows:

*385 (i) Notwithstanding any other rule of evidence or law to the contrary, in the prosecution of second or subsequent offenders under this chapter the official driver record maintained by the department and produced upon a certified computer printout shall constitute prima facie evidence of the prior conviction.
(ii) Following indictment by a grand jury, the defendant shall be given a copy of the department of safety printout at the time of arraignment. If the charge is by warrant, the defendant is entitled to a copy of the department printout at the defendant's first appearance in court or at least fourteen (14) days prior to a trial on the merits.
(iii) Upon motion properly made in writing alleging that one (1) or more prior convictions are in error and setting forth the error, the court may require that a certified copy of the judgment of conviction of such offense be provided for inspection by the court as to its validity prior to the department printout being introduced into evidence.
Tenn.Code Ann. § 55-10-403(g)(3) (Supp.2001) (emphasis added).
Subsection (ii) has no meaning without consideration of subsection (i). Subsection (i) simply provides that when a defendant is prosecuted as a second or subsequent DUI offender, the defendant's official driver record, which is maintained by the Department of Safety and produced upon a certified computer printout, shall constitute prima facie evidence of the prior conviction. This has nothing to do with the validity of a charge of second offense DUI, or the allegations included in an indictment charging second offense DUI. Subsection (ii) then requires the State to provide a defendant with a copy of the Department of Safety printout of the official driver record at the time the defendant is arraigned. Tennessee Code Annotated section 55-10-403(g)(3) does not contain a specific provision for a remedy in the event the defendant does not receive a copy of the computer printout at the time of arraignment. However, if a defendant contends that one or more of the listed prior convictions in the computer printout are in error, subsection (iii) provides relief. Specifically, the defendant may move the court to require that a certified copy of the judgment of conviction be provided for the court's inspection, in order to determine the validity of the previous conviction prior to the computer printout being introduced as evidence.
The indictment, in compliance with Tennessee Code Annotated section 55-10-403(g)(2) (Supp.2001), alleged that Defendant had previously been convicted of DUI on October 19, 1995, in the Circuit Court of Franklin County. Defendant should have filed a motion requiring the State to produce a copy of the Department of Safety computer printout of his driver record when the document was not provided at the arraignment and, if he felt that the prior conviction was in error, he then could have filed a motion for the court to examine a certified copy of the judgment of conviction.
In our view, subsection (ii) of Tennessee Code Annotated section 55-10-403(g)(3) sets forth a condition precedent for the State to take advantage of subsection (i), which allows a copy of the official driver record maintained by the Department of Safety to be admissible as prima facie evidence of a prior conviction, notwithstanding other rules of evidence or laws to the contrary. In the event that the State totally fails to ever produce a copy of the document to a defendant pre-trial, any remedy would have to be limited to the use of the document as prima facie evidence of a prior conviction.
*386 As correctly pointed out by the State in its brief, grounds justifying dismissal of an indictment include the lack of jurisdiction, inordinate delay in instituting the charge or trial, the unconstitutionality of a statute, or violation of double jeopardy. See generally 9 David Raybin, Tennessee Criminal Practice and Procedure §§ 16.1-16.133 (1984). An indictment may also fail because of its form, State v. Hudson, 487 S.W.2d 672, 674 (Tenn.Crim.App.1972), or it may be subject to dismissal when it does not allege essential elements of the offense, State v. Hammonds, 30 S.W.3d 294, 302 (Tenn.2000) (citing State v. Hill, 954 S.W.2d 725, 727) (Tenn.1997)), or because it improperly joins offenses. State v. Smith, 194 Tenn. 608, 253 S.W.2d 992, 993-94 (1952).
We conclude that dismissal of the portion of the indictment charging Defendant as a DUI second offender was not an appropriate remedy for the State's failure to provide Defendant, at his arraignment, with a computer printout of the Department of Safety official driver record of Defendant.
Finally, we shall briefly address the issue of whether or not the language of Tennessee Code Annotated section 55-10-403(g)(3)(ii) is "mandatory" or "directory."
It is correct that when the word "shall" appears in a statute, it is ordinarily construed as being mandatory and not discretionary. Stubbs v. State, 216 Tenn. 567, 393 S.W.2d 150 (1965). Moreover, penal statutes that use the word "shall" and provide a penalty for failure to do what is required are also considered "mandatory" provisions. Blankenship v. State, 223 Tenn. 158, 443 S.W.2d 442, 445 (1969).
However, when determining whether the procedural requirement contained in a statute is directory or mandatory, "the object is to ascertain the legislative intent by consideration of the entire statute, including its nature and purpose, and the consequences that would result from a construction one way or the other." Presley v. Bennett, 860 S.W.2d 857, 860 (Tenn.1993) (citing Stiner v. Powells Val. Hardware Co., 168 Tenn. 99, 103-104, 75 S.W.2d 406, 407 (1934)). "Statutory provisions relating to the mode or time of doing an act to which the statute applies are ordinarily held to be directory rather than mandatory." Id. (emphasis added).
There is no doubt that the pertinent statutory provision in Tennessee Code Annotated section 55-10-403(g)(3)(ii) relates to the time of doing an act, i.e. providing a defendant with a copy of the Department of Safety computer printout, and that it would ordinarily be directory rather than mandatory. Furthermore, the statute in this case does not provide a penalty for the State's failure to give Defendant a copy of the computer printout during the arraignment and, as noted above, our supreme court has specifically held that "penal statutes which use the word `shall' and then provide a penalty for failure to do what is required are universally classified as mandatory statutes." Blankenship, 443 S.W.2d at 445 (emphasis added).
Thus, we conclude that the language in Tennessee Code Annotated section 55-10-403(g)(3)(ii), requiring a copy of the computer printout to be provided to the defendant at arraignment, is directory and not mandatory. Defendant's reliance upon our supreme court's recent decision in State v. Coffee, 54 S.W.3d 231 (Tenn.2001), is misplaced. In that case, the supreme court found the provision in Rule 41 of the Tennessee Rules of Criminal Procedure, which requires a judicial magistrate to prepare an original and two exact copies of a search warrant, to be mandatory. Id. at 232. However, Rule 41 specifically provides that "[f]ailure of the magistrate to *387 make said original and two copies ... shall make any search conducted under said search warrant an illegal search and any seizure thereunder an illegal seizure." Tenn. R.Crim. P. 41(c). Clearly, Rule 41 of the Tennessee Rules of Criminal Procedure provides a penalty for failure to do what is required in the rule. As previously noted, the statute which is the subject of this appeal fails to meet this particular requirement.

Conclusion
For the foregoing reasons, the trial court erred by granting Defendant's motion to dismiss that portion of the indictment charging him with being a DUI second offender. The judgment of the trial court is accordingly reversed, the indictment as originally returned by the grand jury of Coffee County is reinstated, and this matter is remanded to the trial court for further proceedings consistent with this opinion.
