OPINION
This case arose in the Criminal Court of Hamilton County. The appellant, Carol Pace, protests a ruling by the trial judge of that court, holding certain portions of the pretrial diversion statute, T.C.A. § 40-2105 et seq., unconstitutional.
The appellant was indicted for fraudulent breach of trust. She asked that the district attorney place her on pretrial diversion. Upon his refusal, she petitioned the court to review his decision, pursuant to the provisions of T.C.A. § 40-2108(b). In an order dated November 1, 1977, the court dismissed her petition, holding that several portions of T.C.A. § 40-2108, including the one on which the appellant relied in seeking review, were unconstitutional. On November 4, 1977, the appellant was found guilty of the offense charged. The trial judge sentenced her to serve eleven months and twenty-nine days, with that sentence to be *863suspended upon certain conditions being met. The appellant then renewed her exception to the trial judge’s refusal to review her request for pretrial diversion, and was granted an appeal. As the sole issue presented is the constitutionality of T.C.A. § 40-2108, that appeal is properly before this court.
At the time of the appellant’s petition, T.C.A. § 40-2108 provided in pertinent part as follows:
(a) Memorandum of Understanding Permitted. In cases where the defendant does not have a previous felony conviction, the parties may by a memorandum of understanding agree that the prosecution will be suspended for a specified period, not to exceed two (2) years from the filing of memorandum of understanding, for any offense the maximum punishment for which is confinement for ten (10) years or less and/or a fine, on one or more of the following conditions to be observed by the defendant during the period:
***** *
(b) Filing of Memorandum of Understanding and Notice. Promptly after the memorandum of understanding is made, the prosecuting attorney shall file it with the court together with a notice stating that pursuant to memorandum of understanding of the parties . . ., the prosecution is suspended for a period specified in the notice. . . . Said memorandum of understanding must be approved by the trial court before it shall be of any force and effect.
The trial court shall approve said memorandum of understanding unless:
(1) Prosecution has acted arbitrarily and capriciously.
(2) Said memorandum of understanding was obtained by fraud.
(3) The diversion of the case is unlawful.
The defendant shall have a right to petition for a writ of certiorari to the trial court for an abuse of prosecutorial discretion. If the trial court finds that the prosecuting attorney has abused his discretion in failing to divert, the trial court may order the prosecuting attorney to place the defendant in a diversion status on such terms and conditions as the trial court may order. .
(b) * * *
(c) * * *
(d) * * *
(e) Dismissal with prejudice. The trial court shall dismiss with prejudice any warrant or charge against the defendant upon the expiration of ninety (90) days after the expiration of the period of suspension specified in the memorandum of understanding is filed [sic], provided no termination of the memorandum of understanding has been filed under the provisions of subsection (d). If the prosecution is dismissed with prejudice, jeopardy shall attach, and the court shall make a minute entry to that effect.
The last two paragraphs of subsection (b) were added by amendment in 1976, and in the same amendment, in subsection (e) the word “shall” was substituted for the phrase “may in its discretion” preceding “dismiss.”
The trial judge held the statute unconstitutional on three grounds: First, that the provision in T.C.A. § 40-2108(b), providing for review by the trial judge of a refusal by the prosecutor to divert, is “so vague, ambiguous, and uncertain as to be incapable of coherent application”; secondly, that the 1976 Act amending T.C.A. § 40-2108 was broader than the caption of either the original áct or the 1976 amendment, and was thus unconstitutional under Article II, § 17 of the Tennessee Constitution; and, thirdly, that the provision of T.C.A. § 40-2108(b) mandating approval of a memorandum of understanding by the trial judge except in certain limited situations was “an unwarranted invasion of the functions of the Judiciary.” We find no basic defect in the act.
A statute is invalid for vagueness only when “men of common intelligence must necessarily guess at its meaning and differ as to its application.” Underwood v. State, 529 S.W.2d 45, 47-48 (Tenn.1975). We do not believe that this statute presents *864such difficulties in interpretation. The statute vests in the prosecuting attorney the decision as to whether a given defendant is suitable for pretrial diversion and the terms under which diversion will be granted. However, that discretion is not unbridled: It must be exercised so as to serve the interests of justice. Compare United States v. Cowan, 524 F.2d 504 (5th Cir. 1975); United States v. Falk, 479 F.2d 616 (7th Cir. 1973). To that end, it is subject to review by the trial court upon proper application by the defendant. T.C.A. § 40-2108(b). A similar standard has been employed without unreasonable difficulty in the appellate review of a trial judge’s rulings on applications for suspension of sentence under the provisions of T.C.A. § 40-2901 et seq. See Stiller v. State, 516 S.W.2d 617 (Tenn.1974). We anticipate that trial judges will have no greater difficulty applying the provisions of the pretrial diversion statute.
As to the holding that the caption of the amending act was defective under the requirements of Article II, Section 17 of the Constitution of Tennessee, it is fundamental that defects in the caption of the amendatory act, if any, were cured through subsequent action of the legislature codifying the amendment. International Harvester Co. v. Carr, 225 Tenn. 244, 466 S.W.2d 207 (1971).
The trial judge interpreted the amendment to T.C.A. § 40-2108(b) as depriving him of discretion to refuse to divert an eligible defendant with whom the prosecuting attorney had entered into a memorandum of understanding, regardless either of the terms of the memorandum or the merits of the case. He found this to be an impermissible invasion of the function of the judiciary, and as such to be a violation of the separation of powers decreed by Article II, Sections 1 and 2 of the Constitution of Tennessee. If we were to interpret the statute similarly, we would agree. See, e. g., Mabry v. Baxter, 58 Tenn. 682 (1872). Compare Underwood v. State, 529 S.W.2d 45 (Tenn.1975). However, we do not read the statute to so restrict the power of the trial judge. The pretrial diversion statute, as amended, expressly provides that the memorandum of understanding between the prosecuting attorney and a defendant has no force and effect until it is approved by the trial judge. The trial judge is directed to approve the memorandum of understanding unless the memorandum of understanding was obtained by fraud, or the diversion of the case is unlawful, or, more importantly, the prosecuting attorney acted arbitrarily and capriciously in entering into the memorandum of understanding. This latter grant of authority to the trial judge, in our opinion, confirms in him the power and the responsibility to review a memorandum of understanding submitted to him for approval with the view toward determining if there has been an abuse of prosecutorial discretion, either in entering into the memorandum of understanding or in fixing its terms. And, in those instances where the trial judge finds that the terms of the diversion are so lenient, or the character of the defendant such that diversion patently would not be in the interests of justice, the trial judge has the authority to disapprove the memorandum of understanding and effectively keep the defendant out of the diversionary program or have the terms of the memorandum of understanding modified. Such a statutory scheme, in our opinion does not impermissibly intrude on the judicial function, or restrict the power of the trial judge to insure that justice is done in his court, and thus does not violate the separation of powers provisions of Article II, Sections 1 and 2, of the Constitution of Tennessee.
The pretrial diversion act being constitutional, it follows that the trial judge was in error in dismissing appellant’s petition for review of the prosecuting attorney’s decision not to place appellant on pretrial diversion and in requiring appellant to stand trial on the indictment charging her with fraudulent breach of trust. Accordingly, the appellant’s conviction and the suspension of her sentence is set aside. The case is remanded to the trial court for a review of the prosecuting attorney’s refusal to place appellant on pretrial diversion and for *865such further action as may be necessitated by the trial judge’s decision on the completion of his review.
FONES, BROCK, and HARBISON, JJ., concur. HENRY, C. J., filed concurring opinion in which FONES, J., concurred.