
630 N.W.2d 583 (2001)
STATE of Iowa, Appellee,
v.
George Wilburn JOHNSON, Appellant.
No. 00-0487.
Supreme Court of Iowa.
July 5, 2001.
*584 Maria Ruhtenberg of Ruhtenberg Law Office, Des Moines, for appellant.
Thomas J. Miller, Attorney General, Cristen C. Odell, Assistant Attorney General, John P. Sarcone, County Attorney, *585 and Stephanie Cox, Assistant County Attorney, for appellee.
TERNUS, Justice.
This case turns on an interpretation of Iowa Code section 901.10(2) (1999). This statute allows the court to reduce the mandatory minimum sentence imposed by Iowa Code section 124.413 if a defendant, who meets the other prerequisites of the statute, has cooperated in the prosecution of other drug offenders. Although the parties in the case before us agree that no reduction is possible unless the prosecutor has first requested one based on the required cooperation, the parties disagree as to whether the court has power to exceed the level of reduction requested by the State. The district court here refused to consider any reduction of the mandatory minimum term beyond the five-percent reduction requested by the prosecutor. The defendant appeals his sentence, claiming error in the district court's refusal to exercise discretion as to the amount of the reduction.
Upon our consideration of the arguments of the parties, we hold that the district court is not limited to the amount of reduction requested by the prosecutor in reducing a defendant's sentence for cooperation under section 901.10(2). Rather, once the prosecutor has requested a reduction in the mandatory minimum term, the court must exercise its discretion to determine the amount of any reduction, subject to the statutory limitation of "one-half of the remaining mandatory minimum." Iowa Code § 901.10(2). Because the district court here refused to exercise any discretion in determining the amount of the reduction to be given the defendant, we vacate the defendant's sentence and remand for resentencing.

I. Background Facts and Proceedings.

The defendant, George Johnson, pled guilty to possession of a controlled substance (methamphetamine) with intent to deliver in violation of Iowa Code section 124.401(1)(b)(7). Because this offense is a class "B" felony, see id. § 124.401(1)(b)(7), the court sentenced Johnson to an indeterminate prison term of twenty-five years. See id. §§ 902.3 (stating that conviction of a class "B" felony requires imprisonment "for an indeterminate term, the maximum length of which shall not exceed the limits fixed by section 707.3 or section 902.9 nor shall the term be less than the minimum term imposed by law, if a minimum sentence is provided"), 902.9(1) (requiring twenty-five-year sentence for class "B" felony).
The court then considered the application of any required minimum sentence. Initially, the court stated that Johnson would not be eligible for parole until "a minimum period of confinement of one-third of the maximum indeterminate sentence ha[d] been served." See id. § 124.413 (stating that a person convicted under section 124.401(1)(b) "shall not be eligible for parole until the person has served a minimum period of confinement of one-third of the maximum indeterminate sentence prescribed by law"). Then, the court ordered that this minimum term would be reduced by one-third for Johnson's guilty plea. See id. § 901.10(2) (allowing a reduction in the mandatory minimum sentence by up to one-third for a qualifying offender if offender has pled guilty). In addition, Johnson's minimum sentence was further reduced by five percent based on his cooperation in the prosecution of other drug offenders. See id. (permitting, upon the prosecutor's request, an additional reduction in the remaining minimum term of up to one-half for defendant's cooperation with authorities). It is *586 this last order that is the subject of dispute in this appeal.
At the sentencing hearing, the State requested that the court reduce the mandatory minimum term under section 124.413 by an additional five percent based on Johnson's cooperation in prosecuting other drug violators. The defendant requested an additional reduction of fifteen percent. The prosecutor resisted, arguing that section 901.10(2) did not permit the court to grant a reduction for cooperation greater than that recommended by the State. The district court agreed with the State, and refused to consider a reduction in excess of the five percent requested by the prosecutor.
The defendant has appealed. He argues to this court that the restriction on the court's authority suggested by the State is not expressed in the statute. The State argues in response that the defendant's interpretation of the statute is "unworkable" because it (1) would "embroil[ ] the sentencing court in the details of pending cases in various stages of prosecution"; (2) "would jeopardize ongoing investigations by requiring their identification and the accused's involvement in them to be stated on the sentencing record"; and (3) would compromise the defendant's status or the status of others as a confidential informant. In addition, the State asserts that "the prosecutor is in a superior position to evaluate the degree and value of an accused's cooperation."

II. Relevant Principles of Statutory Construction.

The issue on appeal is one of statutory interpretation. We review the district court's interpretation and application of a sentencing statute for the correction of errors at law. See State v. Beach, 630 N.W.2d 598, 600 (Iowa 2001); State v. McCoy, 618 N.W.2d 324, 325 (Iowa 2000).
"The primary purpose of statutory construction is to determine legislative intent." McCoy, 618 N.W.2d at 325. The court gleans this intent from the words used by the legislature. See State v. Kidd, 562 N.W.2d 764, 765 (Iowa 1997). We do not "speculate as to the probable legislative intent apart from the words used in the statute." State v. Adams, 554 N.W.2d 686, 689 (Iowa 1996). In addition, we will not "read something into the law that is not apparent from the words chosen by the legislature." State v. Guzman-Juarez, 591 N.W.2d 1, 2 (Iowa 1999). Finally, the court will not "substitute its judgment for that of the legislature on matters of policy." 1 Norman J. Singer, Sutherland Statutory Construction § 2.01, at 15 (5th ed.1994 rev. vol.); accord State v. Wagner, 596 N.W.2d 83, 88 (Iowa 1999).

III. Discussion of Issue.

The determinative issue in this case is the proper interpretation of the following statute:
1. A court sentencing a person for the person's first conviction under section 124.406, 124.413, or 902.7 may, at its discretion, sentence the person to a term less than provided by the statute if mitigating circumstances exist and those circumstances are stated specifically in the record.
2. Notwithstanding subsection 1, if the sentence under section 124.413 involves a methamphetamine offense under section 124.401, subsection 1, paragraph "a" or "b", the court shall not grant any reduction of sentence unless the defendant pleads guilty. If the defendant pleads guilty, the court may, at its discretion, reduce the mandatory minimum sentence by up to one-third. If the defendant additionally cooperates *587 in the prosecution of other persons involved in the sale or use of controlled substances, and if the prosecutor requests an additional reduction in defendant's sentence because of such cooperation, the court may grant a further reduction in defendant's mandatory minimum sentence, up to one-half of the remaining mandatory minimum sentence.
3. The state may appeal the discretionary decision on the grounds that the stated mitigating circumstances do not warrant a reduction of the sentence.
Iowa Code § 901.10 (emphasis added). Under section 901.10(2), a defendant who pleads guilty to his or her first methamphetamine offense subject to section 124.413 can obtain a one-third reduction in the mandatory minimum term if mitigating circumstances are found. See State v. Iowa Dist. Ct. for Monroe County, 630 N.W.2d 778, 781, n.3 (Iowa 2001). In addition, a defendant who pleads guilty can receive an additional reduction if two further requirements are met: (1) the defendant has cooperated "in the prosecution of other persons involved in the sale or use of controlled substances"; and (2) the prosecutor requests an additional reduction based upon such cooperation. Iowa Code § 901.10(2). Upon the occurrence of these prerequisites, the statute authorizes the court to further reduce the defendant's minimum term of confinement by "up to one-half of the remaining mandatory minimum sentence." Id.
It is clear from the statute that the district court ultimately decides whether the defendant's mandatory minimum sentence should be shortened based on the defendant's cooperation with the authorities. Because section 901.10(2) states that "the court may grant a further reduction," the court has discretion to reject the prosecutor's request for any reduction. Id. (emphasis added); see Adams, 554 N.W.2d at 690 (stating that legislature's use of the word "may" demonstrates its intent "to confer a discretionary power").
The State argues, however, that the court has no discretion to grant a reduction in excess of that requested by the prosecutor. Interestingly, the State does not argue that the court has no discretion at all with respect to the level of reduction. It concedes that the court is not bound by the State's request insofar as the court may choose to grant a reduction less than that requested by the prosecutor. The State simply claims that the prosecutor's request sets a cap on any reduction that may be allowed by the court.
In considering the State's position, we note initially that the statute does in fact place a limitation on the court's discretion, albeit not the one urged by the State. The statute expressly states that the court may not grant a further reduction in excess of "one-half of the remaining mandatory minimum sentence." Iowa Code § 901.10(2). If, as the State suggests, it is the prosecutor who decides the maximum level of the reduction, it seems more logical that any limitations on the extent of the reduction would be placed on the prosecutor, not the court. Moreover, the fact that the legislature expressly limited the court's discretion indicates that it gave consideration to the breadth of the court's power. The legislature could also have expressly limited any reduction by the court to an amount that did not exceed the prosecutor's request, but it did not do so. See State v. Ayers, 590 N.W.2d 25, 31 (Iowa 1999) (holding that sentencing court had discretion under sentencing statute, noting "that the legislature has demonstrated its ability to use restrictive language when it desires to do so"); Adams, 554 N.W.2d at 689 ("legislative intent is also expressed by *588 the legislature's failure to address an issue").
We also point out that the State's proposed interpretation is at odds with the traditional allocation of power among the three branches of government.
The legislature possesses the inherent power to prescribe punishment for crime, and the sentencing authority of the courts is subject to that power. In addition, the legislature has properly placed the authority to plea bargain with the prosecution. Discretion as to what charge to prosecute is normally left to the authority charged with the duty to prosecute. Furthermore, when a plea bargain has been struck, the court has the authority to accept the plea agreement, or to reject it.
State v. Iowa Dist. Ct. for Shelby County, 308 N.W.2d 27, 30 (Iowa 1981) (citations omitted). Subject to the statutorily prescribed punishments for criminal offenses, "the actual sentencing of a defendant is an independent function that is the sole province of the judiciary." State v. Iowa Dist. Ct. for Black Hawk County, 616 N.W.2d 575, 578 (Iowa 2000) (emphasis added).
When we consider section 901.10(2) in the context of these general principles, we think the discretion to determine the extent of any reduction in a defendant's mandatory minimum sentence rests with the district court. First of all, there is no claim here that the amount of any reduction the defendant would receive pursuant to section 901.10(2) was part of the plea bargain leading to his guilty plea. Therefore, the power to determine the defendant's sentence, subject to statutory limitations, would normally lie with the court, not the prosecutor. We find nothing in the statute that changes this general rule.
Moreover, the State's suggestion that the sentencing court cannot grant a reduction greater than that requested by the prosecutor presupposes that the prosecutor's request for "an additional reduction" is for a specific amount. Yet section 901.10(2) does not require that the prosecutor's request be anything more than general in nature. See Iowa Code § 901.10(2) (stating prosecutor may request "an additional reduction" in mandatory minimum term based on defendant's cooperation). If, then, a prosecutor simply asks the court to make "an additional reduction" in the defendant's sentence without specifying how much of a reduction, the court would be required to determine the level of any reduction.
The fact that the court will, under these circumstances, decide the amount of the reduction undermines the State's argument that the court is ill-equipped to determine the value of a defendant's cooperation. Even in situations where the prosecutor's request is specific, the court will have to decide whether the defendant's assistance to law enforcement earned the defendant any reduction in sentence. Thus, even if we were to accept the State's premise that the prosecutor is in a better position to judge the value of a defendant's assistance, that assertion is not a valid ground upon which to read into the statute a limitation on the court's sentencing discretion. If that supposition had been a motivating factor for the legislature when it drafted this statute, the legislature would have simply required that the district court reduce the defendant's minimum sentence by the amount requested by the prosecutor, leaving the court no discretion whatsoever. But, again, that is not what the legislature did.
A similar response must be made to the State's contention that allowing the court *589 to determine the amount of the reduction would embroil the court in the details of ongoing investigations, jeopardize such investigations, and compromise the status of confidential informants. The same information the court would need to determine the amount of any reduction would also be necessary for the court's determination of whether to grant a reduction at all and, if so, whether to grant a reduction in the amount requested by the prosecutor or something less. To the extent there would be any difference in the nature and scope of the evidence required, it would be minimal and certainly not of sufficient magnitude to warrant reading into the statute a limitation on the court's discretion.
We also question whether a system allowing the court to determine the amount of any reduction based on the defendant's cooperation is really as "unworkable" as the State claims. Judges in federal court have for some time been required to decide the level of any sentence reduction based on the nature and value of the defendant's assistance in the investigation and prosecution of others. See 18 U.S.C. § 3553(e) (1994) (allowing a sentence below the statutorily required minimum sentence where the defendant has provided "substantial assistance" to authorities, provided such sentence is imposed in accordance with the sentencing guidelines); U.S. Sentencing Guidelines Manual § 5K1.1 (2000) (stating that "[u]pon motion of the government stating that the defendant has provided substantial assistance in the investigation or prosecution of another person," the court may depart from the sentencing guidelines, placing the responsibility to determine "the appropriate reduction" on the court).
In reality, the State is asking this court to limit the district court's discretion based on the State's belief that court review of the defendant's cooperation would hinder law enforcement efforts. But whether court involvement in determining the appropriate reduction of a defendant's sentence would have undesirable effects on the prosecution of drug offenders is a decision for the legislature to make based on a balancing of the competing interests. Our role is simply "to give effect to the law as written." Wagner, 596 N.W.2d at 88. The legislature chose not to expressly restrict the court's power to reduce the defendant's minimum sentence to the amount requested by the prosecutor; we will not substitute our judgment for that of the legislature on this policy issue.
Finally, we do not think the fact that a reduction is dependent on the prosecutor's request, thus giving the prosecutor power to prevent any reduction at all, suggests that the prosecutor has the power to dictate the amount of the reduction. It is recognized that "[w]here a statute confers powers or duties in general terms, all powers and duties incidental and necessary to make such legislation effective are included by implication." 2B Norman J. Singer, Statutes and Statutory Construction § 55.04, at 388 (6th ed.2000 rev.) [hereinafter "Singer"]. "It is not enough that the power sought to be implied would be convenient or desirable. It must be necessary and essential to carrying out the purpose of the statute." Mississippi Valley Sav. & Loan Ass'n v. L.A.D., Inc., 316 N.W.2d 673, 675 (Iowa 1982); accord In re Melodie L., 591 N.W.2d 4, 7 (Iowa 1999); 2B Singer § 55.03, at 385 (stating that the "usual standard" for determining whether a statute includes implied "applications and effects" is whether such applications and effects "are necessary, essential, natural or proper" and to meet this standard, "there must be a greater justification for ... inclusion [of the implied power] than a *590 consistency or compatibility with the act from which it is implied").
We do not believe that it is necessary or essential that the prosecutor have the implied power to determine the amount of any reduction in order for the prosecutor to exercise his or her express power to make the initial determination as to whether the defendant has provided sufficient cooperation to warrant any reduction at all. Even if we assume that such an interpretation of the prosecutor's role would be consistent with the express terms of section 901.10(2), that fact is not enough to justify expanding the prosecutor's role in sentencing by implication.
Based on the foregoing analysis, we conclude the district court has the ultimate authority to determine the extent of any reduction in the mandatory minimum sentence imposed on a defendant pursuant to section 124.413 once the prosecutor has requested a reduction based on the defendant's cooperation. The amount of any such reduction rests in the court's sound discretion.

IV. Conclusion and Disposition.

When a court has discretion in sentencing, "it must exercise that discretion." Ayers, 590 N.W.2d at 27. When the court fails to exercise its discretion, the sentence must be vacated and the case remanded for resentencing. Id.
In this case, the court did not exercise its discretion to grant a reduction in excess of that requested by the State. Therefore, we vacate the defendant's sentence and remand this case for resentencing.
SENTENCE VACATED AND CASE REMANDED FOR RESENTENCING.
All justices concur except CARTER, J., who dissents.
CARTER, Justice (dissenting).
I dissent. I would affirm the interpretation of section 901.10(2) that the district court applied.
Because section 901.10(2) grants authority to the prosecution to determine whether the sentence may be reduced below that which is otherwise statutorily prescribed, I submit that this grant of authority logically carries with it the right of the prosecution to condition any recommendation of a lesser sentence by imposing a limit on the extent of permissible sentence reduction.
Even if the majority is correct in its interpretation of the statute the case should not be remanded for a revised sentence. It should be remanded with directions to allow the prosecution to determine anew whether it wishes to make any sentencing concession given the majority's interpretation of this statute.
