The opinion of the court was delivered by
On review of a Court of Appeals’ decision, we consider two issues of first impression for this court. Both arise from the district court’s failure to consider a defendant’s financial resources when imposing attorney fees and a fine.
First, can a defendant waive a K.S.A. 22-4513(b) requirement that a district court take into consideration “the financial resources of the defendant and the nature of the burden that payment of such sum will impose” in setting attorney fees in Board of Indigents’ Defense Services (BIDS) cases and, if so, can that waiver occur when a plea agreement states that the defense attorney will recommend payment of costs and appointed attorney fees in an “amount to be determined”? The Court of Appeals held there *211 could be a waiver through a plea agreement and that there was a waiver in this case. State v. Copes, No. 99,403, unpublished opinion, filed December 19, 2008. While we agree a defendant can waive his or her statutory rights under K.S.A. 22-4513(b), we hold there was not an intentional relinquishment of a known right in this case because the plea agreement merely states defense counsel will recommend that the defendant pay attorney fees and does not contain an explicit waiver of rights.
The second issue is whether a district court must consider a defendant’s financial resources before imposing a fine for a conviction of driving under the influence of alcohol (DUI), fourth offense, pursuant to K.S.A. 2009 Supp. 8-1567(g)(1)? According to the defendant, the answer to this question is “yes” because K.S.A. 21-4607(3) states: “In determining the amount and method of payment of a fine, the court shall take into account the financial resources of the defendant and the nature of the burden that its payment will impose.” The Court of Appeals rejected this argument and answered the question “no,” concluding K.S.A. 21-4607(3) is a general statute and is not applicable in light of the more specific applicability of K.S.A. 2009 Supp. 8-1567(g)(l), which requires a $2,500 fine for a fourth or subsequent DUI conviction. State v. Copes, slip op. at 5-6. On review of that decision, we agree with the Court of Appeals’ conclusion that the mandatoiy nature of the fine means financial resources need not be considered in setting the fine amount. Nevertheless, we disagree with the ultimate conclusion that K.S.A. 21-4607(3) has no application because the statute also applies to the determination of the method of payment, and K.S.A. 2009 Supp. 8-1567(j) provides an alternative method of payment by allowing the district court to order payment of a DUI fine through community service.
Factual and Procedural Background
On November 3, 2005, Copes entered a no contest plea to DUI, fourth offense, pursuant to K.S.A. 2005 Supp. 8-1567(g). The district court sentenced Copes to 12 months in jail, with a postrelease supervision term of 12 months. In addition, the court ordered Copes to pay $350 in BIDS attorney fees and assessed a mandatory *212 fine of $2,500 pursuant to K.S.A. 2005 Supp. 8-1567(g). On direct appeal, Copes argued the district court erred by requiring her to pay tire BIDS attorney fees and by imposing the $2,500 fine without first determining on die record whether she had the ability to pay. In State v. Copes, the Court of Appeals affirmed the district court.
Regarding the BIDS attorney fees, the Court of Appeals acknowledged that in
State v. Robinson,
The Court of Appeals concluded, however, that Copes agreed to pay BIDS attorney fees as part of the plea agreement. Although the plea agreement did not specify an exact amount of BIDS attorney fees, Copes agreed that at sentencing her attorney “will recommend” that she be required to pay the costs and appointed attorney fees in “the amount to be determined.” The amount of $350 was written into the journal entry at sentencing. Following the rationale of
State v. Perry,
Regarding the district court’s imposition of a $2,500 fine without first considering Copes’ financial resources, the Court of Appeals held that under the circumstances — where the fine was mandatory and not discretionary — the district court was not required to make findings about Copes’ ability to pay. The panel noted that K.S.A. 21-4607(3) — which requires a district court determining the amount and method of payment of a fine to “take into account the financial resources of the defendant and the nature of the burden that its payment will impose” — is a general statute. The more specific statute, K.S.A. 2009 Supp. 8-1567, controls over the general statute, and K.S.A. 2009 Supp. 8-1567(g)(l) mandates the impo *213 sition of a $2,500 fine for a fourth or subsequent DUI offense and does not contain a provision for waiver of the fine. The Court of Appeals held that in this situation the district court was not required to make the findings under Robinson and K.S.A. 21-4607(3). Copes, slip op. at 5-6.
This court granted the petition for review filed by Copes.
Analysis
Both issues in this appeal involve statutory interpretation, and statutory interpretation is a question of law over which appellate courts have unlimited review. See
State v. Raschke,
BIDS Attorney Fees
First, Copes argues that the district court erred by ordering her to reimburse BIDS attorney fees without first considering her financial resources and the burden such payment will impose as required by K.S.A. 22-4513(b). See
Robinson,
K.S.A. 22-4513(a) requires that BIDS attorney fees “shall be taxed” against the defendant and “shall be enforced” as judgments
*214
for payment of money in civil cases. In setting the amount of the fee, K.S.A. 22-4513(b) requires the district court to take into consideration “the financial resources of the defendant and the nature of the burden that payment of such sum will impose.” Applying that requirement, this court has held that a district court must consider these factors on the record at the time the fee is assessed.
Robinson,
According to the Court of Appeals, these same rules do not apply if a defendant waives his or her statutory rights under
Robinson
and K.S.A. 22-4513(b) in a plea agreement. Copes did so, according to the Court of Appeals, because her plea agreement stated that “[a]t the time of sentencing, my attorney will recommend... [t]hat I be required to pay the costs of this action, and pay appointed counsel fees in the amount to be determined.” In so holding, the panel relied upon
Perry,
In
Perry,
a plea agreement required the defendant to pay “ ‘the costs of this action, and pay appointed counsel fees in the amount of $150/ ”
Perry,
Applying these points, the Court of Appeals concluded that if a plea “agreement is entered into voluntarily, knowingly, and intelligently, the terms of such an agreement are clearly enforceable as a matter of law. See
State v. Shopteese,
In the present case, although Copes’ plea agreement did not specify an exact sum of BIDS fees, the Court of Appeals found Copes’ situation to be comparable to that in Perry.
This result is contrary to the conclusion of a different Court of Appeals panel that disagreed with the notion of applying Perry to a situation where the amount of BIDS fees is not specified in the plea agreement. In the unpublished opinion of State v. Gillespie, No. 100,570, filed September 18, 2009, a split panel found Perry to be distinguishable. There, Gillespie’s plea agreement contained language identical to Copes’ in that it specifically stated his attorney “will recommend” that Gillespie be required to pay “appointed counsel fees in the amount to be determined.” Like the plea agreement in our case, Gillespie’s agreement did not say he agrees to pay fees, nor was a specific amount of BIDS attorney fees mentioned in the agreement.
The Gillespie majority emphasized that unlike the situation in Perry, Gillespie merely agreed that his attorney would malee the general recommendation regarding the payment of BIDS attorney fees. Further, the amount of fees was left open-ended in Gillespie’s plea agreement. The majority remained unconvinced that Gillespie waived his rights under Robinson “for the imposition of an open-ended BIDS fee.” Copes, slip op. at 7-8. The attorney fee was, therefore, reversed and the case was remanded for a hearing to consider Gillespie’s financial resources. Copes, slip op. at 8.
*216 The dissenting judge disagreed with the Gillespie majority’s decision to remand the case to the district court for a Robinson analysis. The dissent would have followed the rationale of Perry and would have found that Gillespie bargained away his right to the financial considerations mandated by Robinson. Following the reasoning in Perry, the dissent reiterated that a defendant can plea bargain away the most basic fundamental constitutional rights and can also bargain away “far less significant statutory rights.” Copes, slip op. at 9. As for the fact that the amount of BIDS fees was specified in Perry’s plea agreement, the Gillespie dissent observed that the district court was not bound by the terms of the plea agreement and, thus, was not obligated to impose the agreed-upon amount of fees. For this reason, the dissent found it of no significance that Gillespie’s plea agreement did not state a specific amount of BIDS fees. Copes, slip op. at 10.
Both of these Court of Appeals’ decisions are consistent to the extent of accepting that a defendant can waive rights in a plea agreement and that the waiver may extend to the right to have a court consider statutory factors in setting attorney fees. The first of these premises is consistent with decisions of this court. See,
e.g., State v. Patton,
We agree with these authorities in general and find no reason to distinguish a knowing, voluntaiy, and intelligent waiver of the statutory rights under K.S.A 22-4513(b) from waivers of constitutional rights through the same process. Hence, we conclude a defendant may waive the right to have a district court make the findings required by K.S.A. 22-4513(b) and may do so in a written plea agreement. If there is a knowing, voluntary, and intelligent waiver, the district court may order payment of BIDS attorney fees without making the findings required by K.S.A. 22-4513 and
Robinson,
In addition, we agree with the premise of
Perry
and
Gillespie
that a plea agreement is generally subject to contract principles. In several cases, we have noted that application of fundamental contract principles is generally the best means to fair enforcement of a plea agreement, as long as courts remain mindful that the constitutional implications of the plea bargaining process may require a different analysis in some circumstances. See
State v. Boley,
Nevertheless, it is a fundamental principle of contract law that there must be a meeting of the minds regarding essential terms in order to have a binding contract.
Mohr v. State Bank of Stanley,
The absence of an explicit waiver of the rights granted by K.S.A.
22-4513(b)
— i.e., to have a district court consider financial resources and the burden of an attorney fee judgment — creates more than a contract problem for the State: For a “ waiver to be valid under the Due Process Clause, it must be “an intentional relinquishment or abandonment of a known right or privilege.” ’ [Citations omitted.]”
State v. Moses,
This case is remanded to the district court with directions to consider Copes’ financial resources and the burden of paying the BIDS attorney fees.
Fine and Financial Resources
Next, Copes argues the district court erred by imposing the statutorily mandated fine of $2,500, pursuant to K.S.A. 2009 Supp. 8-1567(g)(l), for a fourth DUI conviction without first considering her financial resources and the burden its payment will impose. She bases this argument on the language in K.S.A. 21-4607(3), which provides that the district court, when determining “the amount and method of payment” of a fine, “shall take into account the financial resources of the defendant and the nature of the burden that its payment will impose.” (Emphasis added.) The State argues that K.S.A. 21-4607(3) does not apply because K.S.A. 2009 Supp. 8-1567(g)(l), a specific statute, controls and provides that *219 upon being convicted of a fourth or subsequent DUI conviction, a person “shall” be fined $2,500.
Relevant Statutes
To resolve this issue, two statutes must be considered. The first, K.S.A. 21-4607(3), provides:
“In determining the amount and method of payment of a fine, the court shall taire into account the financial resources of the defendant and the nature of the burden that its payment will impose.”
The second, K.S.A. 2009 Supp. 8-1567, provides in pertinent part:
“(g)(1) On the fourth or subsequent conviction of a violation of this [DUI] section, a person shall be guilty of a nonperson felony and sentenced to not less than 90 days nor more than one year’s imprisonment and fined $2,500. . . .
“(j) In lieu of payment of a fine imposed pursuant to this section, the court may order that the person perform community service specified by the court. The person shall receive a credit on the fine imposed in an amount equal to $5 for each full hour spent by the person in the specified community service. The community service ordered by the court shall be required to be performed not later than one year after the fine is imposed or by an earlier date specified by the court. If by the required date the person performs an insufficient amount of community service to reduce to zero the portion of the fine required to be paid by the person, the remaining balance of the fine shall become due on that date.”
These provisions raise separate considerations relating to the application of K.S.A. 21-4607(3): 8-1567(g) relates to the amount of the fine and subparagraph (j) relates to the method of payment.
Amount of Fine
With regard to the State’s argument about the mandatory nature of the amount of the fine for a fourth or subsequent DUI conviction, this court reviewed a similar issue in
Raschke,
In determining whether the legislature’s use of “shall” makes the forgery fine provisions mandatory or directory, this court considered the following factors: (1) legislative context and history, (2) substantive effect on a party’s rights versus merely form or procedural effect; (3) the existence or nonexistence of consequences for noncompliance; and (4) the subject matter of the statutory provision. We concluded that the word “shall” in K.S.A. 21-3710(b)(2)-(4) is mandatoiy rather than directory. In other words, “[a]t least the minimum fine must be imposed upon every forgery conviction.”
Raschke,
Then, we considered whether the financial consideration requirements of K.S.A. 21-4607(3) must be applied to the mandatory minimum forgery fines. We concluded that they do not. Considering the legislative history of the forgery provisions, the
Raschke
court noted that there was no reference in the legislative committee notes to an overlay of K.S.A. 21-4607. Moreover, K.S.A. 21-3710(b)(2)-(4) is the newer of the two statutes and “presumably the more recent statement of legislative intent.”
Raschke,
In the present case, a similar analysis applies in considering whether a fine must be imposed and in determining the amount of the fine for a fourth or subsequent DUI conviction. In considering whether the word “shall” in K.S.A. 2009 Supp. 8-1567(g)(l) is mandatory or directory, we consider the four factors laid out in *221 Raschke. With regard to the first factor — legislative context and history — clearly the DUI fines are specific to the offense and correspond to the number of convictions. The legislative histoiy of subsection (g) is not particularly helpful but shows that the $2,500 fine was set for fourth or subsequent DUI convictions in 2001. See L. 2001, ch. 200, sec. 14. Before the 2001 amendment, a fourth DUI conviction received the same possible fine as a third DUI conviction in that “third or . . . subsequent conviction[s]” were to be fined “not less than $1,000 nor more than $2,500.” See L. 1994, ch. 291, sec. 2. By placing the sole fine of $2,500 on fourth or subsequent convictions, the legislature showed its intent to withdraw any discretionary range for this category of offenders.
With regard to the second factor — substantive effect on a party’s rights — it is indisputable that “[prescription of a minimum criminal sentence certainly is material; it is not simply a mode of procedure intended to secure order, system, and dispatch of the public business.”
Raschke,
This leads to the conclusion that the word “shall” in K.S.A. 2009 Supp. 8-l567(g)(l) makes imposition of a $2,500 fine for a fourth or subsequent driving under the influence conviction mandatory, rather than directory. As we concluded in Raschke, the specific, more recent requirement of a mandatory fine leaves no room for considering financial resources. The district court was required to impose a $2,500 fine against Copes for her fourth DUI conviction and was not required to take into account the financial resources of the defendant and the nature of the burden its payment will impose, per K.S.A. 21-4607(3), in deciding to impose the fine and in deciding the amount of the fine.
Method of Payment
There remains, however, a question of whether the district court was required to consider Copes’ financial resources in determining the method of payment. Again, K.S.A. 21-4607(3) states the district court “shall take into account the financial resources of the defendant and the nature of the burden that its payment will impose” when “determining the amount and method of payment of a fine.” (Emphasis added.) The community service option provided in K.S.A. 2009 Supp. 8-1567(j) creates an alternative method of payment.
The impact of the community service option was not addressed by the Court of Appeals. Moreover, the parties had not addressed the provision until prompted to do so by this court’s questions at oral argument. Nevertheless, in applying a statute, courts are required to consider a statute as a whole. See
Southwestern Bell Telephone Co. v. Beachner Const. Co., Inc.,
Where the
amount
of fine is discretionary, this court has required the district court to “state on the record that he or she has taken into account the financial resources of the defendant and the nature of the burden that payment of the fine will impose.”
State
*223
v. McGlothlin,
In summary, regardless of Copes’ financial resources, the district court was correct to impose the entire $2,500 fine, a mandatory fine, for her fourth DUI conviction. But the legislature clearly contemplated the notion of financial hardship or the burden of payment by allowing the discretionary imposition of community service (credit of $5 per hour) to offset the total amount due. By failing to consider Copes’ ability to pay and the burden the payment will impose on her, the district court bypassed the consideration of whether community service was an option for her.
The Court of Appeals’ decision affirming the district court is reversed and remanded. The district court’s decision is reversed and remanded for consideration of Copes’ financial resources with respect to the amount of BIDS attorney fees she is required to pay and to the method of payment of her DUI fine.
