INTRODUCTION
T1 Michael Bilanzich asks this court to overturn a court of appeals decision denying his claim for attorney fees. We hold that Utah Code section 78-27-56.5 grants the district court discretion to award attorney fees and costs to a prevailing party if the writing that forms the basis of the lawsuit provides attorney fees for at least one party. Therefore, we reverse the court of appeals and remand to that court with instructions to remand the case to the district court for further proceedings.
BACKGROUND
T2 John and Eunes Lonetti (the "Lonet-tis") loaned $1,780,600 to Reese's Enterprises, Inc. ("REI"). The loan was evidenced by a promissory note and secured by a security agreement and a trust deed in real property owned by the corporation. The Lonettis and REI later entered into an agreement modifying the original promissory note to account for the outstanding principal, interest, and an additional loan of $354,938. The modified promissory note held a balance of $2,167,717. The Lonettis subsequently filed suit against REI to foreclose their trust deed and collect on the note.
T3 In an attempt to resolve REIT's legal and financial woes, a representative of REI approached Bilanzich, proposing that he execute a personal guaranty on the Lonetti loan and other debts in exchange for an ownership interest in REI. Thereafter, in order to settle the Lonetti suit, REI, the Lonettis, and Bilanzich entered into a settlement agreement memorialized in a document entitled "term sheet." Among other things, the term sheet provided that Bilanzich would place a personal guaranty of the REI promissory note into escrow and that, upon the satisfaction of the condition that REI obtain adequate financing, the guaranty would be released to the Lonettis at a closing. The term sheet specified that "iff financing is not obtained, the closing will not occur, all items in escrow will be returned to the party depositing them, and Lonetti will foreclose and realize on security."
T4 In accord with the provisions of the term sheet, Bilanzich signed a personal guaranty and placed it in eserow. The Bilanzich guaranty included a unilateral provision that granted to the Lonettis any "costs, expenses, and attorney's fees incurred in collection of the Note and realization of the security."
T5 REI did not obtain adequate financing to satisfy the conditions of the term sheet, and the corporation later filed for bankruptcy. Despite this fact, the Bilanzich guaranty was released from escrow to the Lonettis. The Lonettis subsequently assigned the REI note, the deed of trust, and the Bilanzich guaranty to their company, JDL Holdings L.C. ("JDL").
T6 Bilanzich filed this action in August 2000, seeking to have the personal guaranty *1044provided to the Lonettis declared unenforceable due to the nonoceurrence of a condition precedent to the guaranty.1 Bilanzich also sought a rescission of the guaranty and a claim of unjust enrichment against the Lon-ettis and JDL. JDL then brought suit against Bilanzich, seeking to recover on the guaranty. The JDL action was consolidated with the Bilanzich case. In August 2008, Bilanzich filed a motion for partial summary judgment against the Lonettis and JDL, which the district court granted, holding that the failure of a condition precedent set forth in the term sheet rendered the guaranty unenforceable. Thereafter, Bilanzich agreed with the Lonettis and JDL to dismiss his other claims in exchange for an agreement not to appeal the judgment.
T7 Bilanzich then filed a motion seeking his attorney fees pursuant to Utah Code section 78-27-56.5 and the terms of the guaranty. Bilanzich argued that this statute entitled him to attorney fees because the guaranty allowed at least one party to recover fees and because the litigation was based on that document. The Lonettis and JDL opposed the motion for fees, principally arguing that Bilanzich could not rely on a provision for attorney fees found in a document that was ruled to be unenforceable. The Lonettis and JDL also asserted that the settlement agreement barred such a motion and that the fees claimed by Bilanzich were unreasonable in light of the multiple defendants and claims involved.
T8 The district court denied Bilan-zich's motion for fees.2 Bilanzich appealed. The court of appeals affirmed the district court on the basis of the common law rule that a party may not "'avoid [a] contract and, at the same time, claim the benefit of the provision for attorney fees"" Bilanzich v. Lonetti, 2005 UT App 522U, paras. 4, 7, 2005 WL 8315329 (quoting BLT Inv. Co. v. Snow, 586 P.2d 456, 458 (Utah 1978)). In so holding, the court of appeals reasoned that the common law rule established in BLT Investment survived the enactment of Utah Code section 78-27-56.5. Id. para. 6.
T9 Bilanzich subsequently petitioned for certiorari, which we granted for the following issue: "Whether Utah Code Ann. § 78-27-56.5 allows an award of attorney fees pursuant to a contract, where a party successfully claims the same contract is unenforceable due to failure of a condition precedent."
STANDARD OF REVIEW
€10 The question presented to us requires an interpretation of Utah Code seetion 78-27-56.5. Statutory interpretation is a matter of law that we review for correctness. MacFarlane v. State Tax Comm'n, 2006 UT 25, ¶9, 184 P.3d 1116. Consequently, we cede no deference to the court of appeals.
ANALYSIS
111 Generally, attorney fees are awarded only when authorized by contract or by statute. Fericks v. Lucy Ann Soffe Trust, 2004 UT 85, ¶23, 100 P.3d 1200. But see Stewart v. Pub. Serv. Comm'n, 885 P.2d 759, 782-83 (Utah 1994) (awarding fees under this court's equitable powers in an original proceeding challenging a telephone rate increase where the petitioner acted "as a private attorney general"). Bilanzich has no contractual right to attorney fees because the fees provision within the guaranty was unilateral, *1045providing for an award of attorney fees and costs only to the Lonettis 3 in the event of a lawsuit. Moreover, even if the contractual language had allowed Bilanzich to recover fees and costs, under the common law, the invalidation of the guaranty due to the failure of the condition precedent necessarily invalidated the attorney fees clause contained therein.4 BLT Inv. Co. v. Snow, 586 P.2d 456, 458 (Utah 1978); Quealy v. Amderson, 714 P.2d 667, 668-69 (Utah 1986).
{12 Because Bilanzich cannot establish a contractual claim to attorney fees, we next consider whether Utah Code section 78-27-56.5 grants authority to the district court to award attorney fees and costs to Bilanzich. Under the statute,
[a] court may award costs and attorney's fees to either party that prevails in a civil action based upon any promissory note, written contract, or other writing executed after April 28, 1986, when the provisions of the promissory note, written contract, or other writing allow at least one party to recover attorney's fees.
Utah Code Ann. § 78-27-56.5 (2002).
{183 "When interpreting statutes, our primary goal is to evince the true intent and purpose of the Legislature." State v. Martines, 2002 UT 80, ¶8, 52 P.3d 1276 (internal quotation marks omitted) The first step of statutory interpretation is to evaluate the "best evidence" of legislative intent, namely, "the plain language of the statute itself." Id. (internal quotation marks omitted). "When examining the statutory language we assume the legislature used each term advisedly and in accordance with its ordinary meaning." Id. (internal quotation marks omitted).
14 The plain language of Utah Code seetion 78-27-56.5 provides that a court may award costs and attorney fees to a prevailing party in a civil action if two main conditions are met. First, the civil action must be "based upon any promissory note, written contract, or other writing." And second, "the provisions of the promissory note, written contract, or other writing" must "allow at least one party to recover attorney's fees."
115 The first condition of the statute is met because the Lonettis'® claim against Bilanzich was based entirely upon the personal guaranty. Utah Code section 78-27-56.5 defines those documents that may form the basis of a lawsuit under this section very broadly. Any "promissory note, written contract, or other writing" falls within the ambit of the statute so long as the litigation is "based upon" that document. This first condition requires only that a party to the litigation assert the writing's enforceability as basis for recovery; the statute's plain language does not require that the writing actually be enforceable. Therefore, the litigation below meets the first criterion of the statute because it was based upon the Lonettis' assertion that the guaranty provided them with a legal right to recovery.
The second condition of the statute is also met because the guaranty provides for an award of attorney fees and costs to the Lonettis.5 Although the guaran*1046ty itself was rendered unenforceable by the failure of a condition precedent, the language of the statute focuses on the provisions of the writing rather than its legal effect. Under the statute, it is immaterial that events outside of the writing rendered the guaranty ineffectual because the provisions of the guaranty "allow[ed] at least one party to recover attorney's fees." Thus, under the clear terms of Utah Code section 78-27-56.5, a court may award attorney fees and costs to Bilanzich as the prevailing party because the litigation was based on a writing that granted attorney fees to at least one of the parties in the litigation.6
$17 We note, however, that the language of the statute is not mandatory but allows courts to exercise discretion in awarding attorney fees and costs. Under the plain language of Utah Code section 78-27-56.5, "[a] court may award costs and attorney's fees" (emphasis added), but is not required to do so. In interpreting the Utah Arbitration Act, which contains a similarly worded attorney fees provision, see Utah Code Ann. § 78-31a-126(8) (2002), we have held that the use of the word "may" indicates that the court has discretion in awarding fees, Paul de-Groot Bldg. Servs., LLC. v. Gallacher, 2005 UT 20, ¶22, 112 P.3d 490; Busas Baseball, Inc. v. Salt Lake Trappers, Inc., 925 P.2d 941, 952-53 (Utah 1996). Because Utah Code section 78-27-56.5 provides no guidance as to when fees should be awarded, district courts should look to the policies underlying the statute in exercising this discretion. Paul deGroot Bldg. Servs., 2005 UT 20, ¶¶22-23, 112 P.3d 490; Buzsas Baseball, 925 P.2d at 953. We pause to analyze these policies.
T18 Utah Code section 78-27-56.5 was designed to "create] a level playing field" for parties to a contractual dispute. Anglin v. Contracting Fabrication Machining, Inc., 2001 UT App 341, ¶11, 37 P.3d 267. The statute levels the playing field by allowing both parties to recover fees where only one party may assert such a right under contract, remedying the unequal allocation of litigation risks built into many contracts of adhesion. In addition, this statute rectifies the inequitable common law result where a party that seeks to enforce a contract containing an attorney fees clause has a significant bargaining advantage over a party that seeks to invalidate the contract. The former could demand attorney fees if successful, while the latter could not. Quealy, 714 P.2d at 672 (Zimmerman, J., concurring).
119 Consequently, in order to further the statute's purpose, the exposure to the risk of a contractual obligation to pay attorney fees must give rise to a corresponding risk of a statutory obligation to pay fees. In exercising their discretion, therefore, district courts should award fees liberally under Utah Code section 78-27-56.5 where pursuing or defending an action results in an unequal exposure to the risk of contractual liability for attorney fees.7
*1047 T20 We stress that in furthering the policies behind Utah Code section 78-27-56.5, however, courts may also inform their decisions with other equitable principles. For example, in the spirit of leveling the playing field, courts should avoid using this statute to expose one party to a disproportionate risk of paying attorney fees that would result in a windfall to the other party. District courts should also apply common sense principles in determining the prevailing party, if any. See A.K. & R. Whipple Plumbing & Heating v. Guy, 2004 UT 47, ¶11, 94 P.3d 270; J. Pochynok Co. v. Smedsrud, 2005 UT 39, ¶¶9, 12, 116 P.3d 353.
121 Section 78-27-56.5's3 use of the word "may" also indicates that courts have broad discretion in applying equitable principles in fixing the amount of any award of fees under the statute. Although the statute does not specifically require that the award of attorney fees and costs be reasonable, the district court may exercise its discretion to impose such a requirement. See R.T. Nielson Co. v. Cook, 2002 UT 11, ¶20, 40 P.3d 1119 ("The trial court has broad discretion in determining what constitutes a reasonable fee ...." (internal quotation marks and citation omitted)). Additionally, in cases where multiple defendants are involved, such as this one, the district court may limit the award of attorney fees to the losing party's equitable share of the total amount. We also note that should Bilanzich ultimately prevail in recovering fees, the district court may properly consider a request to award his attorney fees and costs associated with his appeals. See First Sw. Fin. Servs. v. Sessions, 875 P.2d 553, 556 (Utah 1994) (instructing the district court to award reasonable attorney fees and costs incident to an appeal pursuant to the attorney fee provision contained in Utah Code section 57-1-82).
122 Finally, Bilanzich argues that this court should reject the Lonettis' remaining claim that the settlement agreement barred Bilanzich from seeking fees. We decline to do so. It is not the role of this court to resolve fact-sensitive claims that are not encompassed within the question on which we granted certiorari and have not been properly addressed in the courts below. On remand, therefore, the district court should address all remaining issues that were properly presented to it but not resolved.
CONCLUSION
1 23 We hold that even though the guaranty is unenforceable, Utah Code section 78-27-56.5 does allow Bilanzich to seek attorney fees and costs. The statute grants the district court discretion in awarding fees. Such discretion should be exercised in accord with the legislative purpose behind the statute, as well as other equitable principles. We therefore reverse the court of appeals and remand this matter to that court with instructions to remand the case to the district court for further proceedings consistent with this opinion.
{24 Chief Justice DURHAM and Justice DURRANT concur in Justice PARRISH's opinion.. In addition to his claims against the Lonettis, Bilanzich also made separate claims for relief against Jones, Waldo, Holbrook & McDonough, the law firm that had represented him in the settlement deal; D. Williams Ronnow, the individual lawyer that had released the guaranty from escrow; Cambridge Capital Group, Inc., a financial institution that had loaned money to REI; and REI itself. During the suit's complicated history, additional claims and defendants were added until there were twelve named defendants. We address only that portion of the procedural history relevant to the present appeal.
. The district court did not specify which rationale it used to reject Bilanzich's motion. The court of appeals, however, interpreted the district court's ruling as being based upon the unen-forceability of the guaranty rather than the existence of the settlement agreement. Bilanzich v. Lonetti, 2005 UT App 522U, para. 1, 2005 WL 3315329. Because ""we review the decision of the court of appeals, not the trial court," Li v. Enterprise Rent-A-Car Co. of Utah, 2006 UT 80, ¶8, 150 P.3d 471, and because neither party asserts that the court of appeals erroneously focused on the enforceability of the guaranty, we confine our analysis to that issue.
. - Because the suit below involved the Lonettis as individuals as well as their company JDL, our use of the term "Lonettis" throughout the remainder of this opinion refers to both John and Eunes Lonetti and JDL.
. Although we did not grant certiorari on this issue, Bilanzich also argues that the rule in BLT Investment is inapplicable because the district court merely excused an obligation contained in the guaranty, but did not void it entirely. See Quealy v. Anderson, 714 P.2d 667, 673 (Utah 1986) (Hall, C.J., dissenting) ("A condition precedent may qualify the existence of an entire contract or only the performance of a contractual duty."). Consequently, he argues that the attorney fees provision retains its force under the common law of contract.
In the present case, however, the failure of the condition precedent invalidated the entire guaranty and not just the performance of a particular contractual duty. The condition that REI obtain adequate financing was precedent to the delivery of the guaranty document itself. Therefore, the failure of the condition rendered the entire document unenforceable.
. Despite the fact that the Lonettis requested an award of attorney fees from the district court, they claim in their briefing that the terms of the guaranty did not grant them attorney fees and that therefore Utah Code section 78-27-56.5 does not apply. They point to the language of the guaranty that provides for "attorney fees incurred in collection of the Note and realization of the security" and argue that because they were *1046merely attempting to enforce the guaranty, not to collect on the underlying note, they had no contractual right to fees. This attempt to draw such a fine distinction fails because it ignores the fact that a personal guaranty does not exist in a vacuum. The guaranty extends liability under the note, and an action to enforce the guaranty is necessarily an attempt to collect on the obligation under the note.
. The Lonettis argue that Utah Code section 78-27-56.5 should not be interpreted to controvert the common law rule established in BLT Irvestment absent a clearer legislative mandate to do so. However, "[wle have long held that where a conflict arises between the common law and a statute or constitutional law, the common law must yield." Gottling v. P.R. Inc., 2002 UT 95, ¶7, 61 P.3d 989 (internal quotation marks and citation omitted). Additionally, the legislature has clearly stated that Utah statutes that contradict the common law are not to be interpreted narrowly:
The rule of common law that statutes in derogation thereof are to be strictly construed has no application to the statutes of this state. The statutes establish the laws of this state respecting the subjects to which they relate, and their provisions and all proceedings under them are to be liberally construed with a view to effect the objects of the statutes and to promote justice.
Utah Code Ann. § 68-3-2 (2004). Thus, where the plain language of a statute works a result contrary to the common law, the legislature need not further clarify its intent for this court to give effect to the statute's plain meaning.
. The purpose behind Utah Code section 78-27-56.5 is somewhat unique in comparison to other statutes that allow courts to award attorney fees. *1047For example, Utah Code section 78-27-56 allows district courts to award attorney fees in order to discourage frivolous and bad faith litigation. Utah Code Ann. § 78-27-56 (2002) (awarding attorney fees to a prevailing party if the losing party asserted claims or defenses that were "without merit and not brought or asserted in good faith"). Under this statute, courts should exercise their judgment in awarding attorney fees in light of the merits of the case and the intent of the party in bringing or defending the action. Still Standing Stable, L.L.C. v. Allen, 2005 UT 46, ¶¶7, 12, 122 P.3d 556.
Unlike statutes such as Utah Code section 78-27-56, which require courts to analyze the merits of the litigation and the intent of the losing party to further the legislative purpose of reducing frivolous and bad faith litigation, Utah Code section 78-27-56.5 does not require such an inquiry. - Rather than alleviating the burdens associated with meritless and bad faith litigation, section 78-27-56.5 seeks to remedy the exposure to uneven litigation risks created by contractual provisions. Even good faith actions and defenses to actions implicate this policy.