#### STACEY PROPERTIES, a Utah limited partnership, Plaintiff, Appellant, and Cross-Respondent, v. Ben WIXEN, Francine Wixen, Bernie Goler, and Bonnie Goler, Defendants, Respondents, and Cross-Appellants.

No. 880127-CA.

Court of Appeals of Utah.

Dec. 20, 1988.

*1081Robert M. Anderson, William P. Schwartz (argued), Hansen & Anderson, Salt Lake City, for plaintiff, appellant, and cross-respondent.

Clark Waddoups, Ronald G. Russell (argued), Larsen, Kimball, Parr & Crockett, Salt Lake City, for defendants, respondents, and cross-appellants.

Before GARPF, BENCH and JACKSON, JJ.

BENCH, Judge:

Plaintiff appeals from final judgment on an action to accelerate the balance due on a promissory note. Defendants appeal from final judgment on their counterclaim for breaches of warranty and contract. There are three issues presented for review. First, did the trial court err in dismissing plaintiff’s claim for acceleration of the balance owed on the promissory note? Second, did the court err in measuring damages to be awarded defendants on their counterclaim? Third, did the court err in failing to award attorney fees? We affirm in part, reverse in part, and remand.

This dispute stems from the sale in May 1984 of several commercial properties located in and around Ogden, Utah. Stacey Properties Ltd. (Stacey), a Utah limited partnership, and J. Ron Stacey, general partner, sold the properties to defendants Ben and Francine Wixen and Bernie and Bonnie Goler, general partners of Golwix Properties (Golwix). The total purchase price exceeded $3.5 million, most of which was paid through Golwix’s assumption of existing debt. Golwix also executed a promissory note in the amount of $80,000 payable in monthly installments to Stacey.

The terms of the promissory note included an offset provision, an acceleration clause, and a provision for Stacey’s attorney fees in the event enforcement of the note became necessary. In conjunction with the note, a letter agreement memorializing the terms of the sale provided for, inter alia, express warranties on certain aspects of the properties and for Golwix’s *1082attorney fees for any breach of those warranties.

The note and agreement were executed on May 22, 1984. On September 5, 1984, Golwix asserted an offset against payments due under the note. A week later, Stacey notified Golwix that the entire balance due under the note was being accelerated because of Golwix’s “default.” Stacey filed suit on December 5, 1984, and Golwix counterclaimed.

Trial before the court commenced on May 28,1986. After three days of testimony, the trial court determined that Golwix had failed to make a total of $16,099.38 in payments on the note by the time of trial. The court further determined that Golwix had established offsets totaling $6,727.33 for replacement of an air conditioner and repair of a sewer system. Golwix was also awarded $12,250 in damages on its counterclaim for replacement of a roof. The trial court found that there had been no default and denied Stacey’s demand to accelerate the balance due on the note. Neither party was found to be entitled to an award of attorney fees. Both parties appeal the judgment.

ACCELERATION OF THE PROMISSORY NOTE

Although an acceleration clause “will be enforced in accordance with the agreement of the parties,” *KIXX, Inc. v. Stallion Music, Inc.,*610 P.2d 1385, 1388 (Utah 1980), the remedy is a harsh one “not favored in the law.” *Williamson v. Wanlass,*545 P.2d 1145, 1147 (Utah 1976).

Stacey contends on appeal that it should have been permitted to accelerate the due date of the principal balance of the promissory note according to the note’s terms. The pertinent provision of the note states:

> In the event this Note, or any obligation provided to be satisfied or performed under any agreement, instrument or document connected with or related to this Note, now existing or otherwise, is breached or is not satisfied, performed or paid, at the time and in the manner required, [Stacey], at its option and without notice, may declare the unpaid principal balance and accrued interest immediately due and payable and [Golwix] agreefs] to immediately pay the same.

We examine this provision as we would a contract, since “[p]romissory notes ... are contracts between the parties, and the rules of construction applicable to contracts apply to them.” *First Nat’l Bank & Trust Co. v. Lygrisse,*231 Kan. 595, 647 P.2d 1268, 1272 (1982). Furthermore, “[t]he interpretation of contract language presents us with a question of law on which we need not defer to the trial court’s construction but are free to render our independent interpretation.” *Faulkner v. Farnsworth,*714 P.2d 1149, 1150 (Utah 1986); *see also Ted R. Brown & Assoc., Inc. v. Carnes Corp.,*753 P.2d 964, 968 (Utah App.1988).

Stacey claims on appeal that th,e ruling below discourages unsecured loans, creates a precedent opposed to the policy of prompt notification of default, and weakens the enforceability of acceleration provisions in general. We disagree. The essence of the ruling of the trial court is merely that acceleration was premature at the time of notification and unwarranted later because of the amount of Golwix’s offset.

At the time Golwix notified Stacey of its offset claim, two of the four monthly installment payments due had been paid. There is testimony in the record that the parties had agreed to postpone payment of the initial monthly installment for one year. The remaining unpaid installment was due on September 1, 1984, four days before Golwix sent notification of its offset. Prior to submission of its offset claim, Golwix had already paid or deferred three of the four installment payments due. On those facts, the court could reasonably find that no default had occurred at the time of the attempted acceleration.

The court also found that acceleration was unwarranted because the amount of offsets asserted by Golwix exceeded the amount in arrears on the note. It is clear from the record that Golwix bargained for and received a contractual right of offset. The operative provision of the promissory note states:

> *1083[Golwix] shall have the right to offset against any amounts due or to become due to [Stacey] under this Note any such reimbursement due to [Golwix] under Section 17 of said letter agreement or under any other provision thereof or of any document executed in conjunction therewith, provided, however, that [Gol-wix] give[s] [Stacey] written notice of the amount to be offset and the specific reasons therefor.

The trial court considered this provision along with the following provision of the letter agreement:

> The properties have been inspected by [Golwix] and are purchased “as is”.... [Stacey] agree[s] to remedy any latent defects in materials or workmanship which arise within a one year period from the date of closing. We represent and warrant to you that all heating, cooling, electrical, plumbing and sewer systems at the properties are in working order and will be operative at closing and that the footings and foundations are free from material structural defects.... We will perform all necessary repairs to the roof of the Post Office building which are reasonably required to maintain a water tight roof surface for a period of sixty seven [sic] months from the date of closing at our sole cost and expense.

When Golwix incurred a $22,758 expense to replace an air conditioner, it referred to the warranty provision of the letter agreement and exercised its contractual offset right under the promissory note. These two instruments could be reasonably construed together. *Verhoef v. Aston,*740 P.2d 1342, 1344 (Utah App.1987) (agreements which are related and executed contemporaneously must be construed as a whole and harmonized). The trial court could also properly balance the acceleration and offset terms of the note, giving effect to each of the provisions of the entire agreement. *Minshew v. Chevron Oil Co.,*575 P.2d 192, 194 (Utah 1978) (contractual provisions must be interpreted in light of the entire agreement, giving effect to every other provision). We conclude that the trial court was legally correct in holding that acceleration was unwarranted because the offset exceeded the total payments due on the note. *See, e.g., Wells v. Cobb,*455 So.2d 1069 (Fla.Dist.Ct.App.1984) (acceleration was improper where default had not occurred due to offset). Accordingly, acceleration was unwarranted prior to trial, and we affirm the ruling of the trial court.1

MEASURE OF DAMAGES ON COUNTERCLAIM

Stacey argues that the trial court erred in measuring damages to be awarded Gol-wix on its counterclaim. Much of the trial record is devoted to establishing the timing, cost, and extent of repairs needed on the various sale properties. Based on the factual findings, the trial court determined as a matter of law that Stacey was liable on only three of Golwix’s claimed offsets. The court found that: 1) Stacey had breached its contract to maintain a watertight roof at thepost office property; 2) Stacey had breached its warranty that the cooling system at the post-office was to be operative on the closing date^and 3) Stacey had breached its warranty to remedy any latent defects in materials or workmanship by failing to remedy a defect in the sewer system at the shopping center property. Although the court awarded a dollar-for-dollar reimbursement of the sewer repairs, the replacement costs for the roof and air conditioner were apportioned 25% to Stacey and 75% to Golwix. This apportionment is at issue on appeal.

Damages recoverable in a breach of contract action are generally “those which arise naturally from the breach and which reasonably may be supposed to have been within the contemplation of the parties or are reasonably foreseeable.” *Robbins v. Finlay,*645 P.2d 623, 625 (Utah 1982).2*1084“Damages are properly measured by the amount necessary to place the nonbreach-ing party in as good a position as if the contract had been performed.” *Alexander v. Brown,*646 P.2d 692, 695 (Utah 1982).

A review of the amounts awarded to Golwix for the roof leads us to conclude that this rule was properly applied. The trial court’s apportionment of the costs for roof replacement was based on evidence in the record that a new twenty-year roof would cost $49,000. Since Stacey had contracted to maintain the roof for approximately five years, the court reasonably found that Stacey should bear the cost of five years of a twenty-year roof, i.e., 25% of $49,000, or $12,250.

The trial court likewise apportioned the actual replacement cost of the air conditioner. Golwix was awarded 25% of the replacement cost of $22,758, or $5,689.50. The court held that Golwix would “receive a windfall” if Stacey was held responsible for the full replacement cost. The award, however, fails to “place the nonbreaching party in as good a position as if the contract had been performed.” *Alexander,*646 P.2d at 695. Golwix contracted for a cooling system that was to be operable on the day of closing. What it received was an air conditioner that was not in working order on that date. Since the evidence indicates that the reasonable cost of repairing the unit would have been between $19,-000 and $20,000, the court’s award was insufficient to afford Golwix the benefit of its bargain. For that reason, the award for the air conditioner should be increased, on remand, to reflect the reasonable cost of repair.

ATTORNEY FEES

Both parties sought, and were denied, attorney fees under provisions of the promissory note and letter agreement. Stacey based its claim for attorney fees on the following provision of the promissory note:

> [Golwix] agree[s] to pay any and all costs and expenses (regardless of the particular nature thereof and whether incurred with or without suit or before or after judgment, including reasonable attorneys’ fees) which may be incurred by or in connection with the enforcement or performance of any of the rights of [Stacey] hereunder or under any agreement, instrument or document connected with or related to this Note.

Golwix based its claim for fees on the following provision of the letter agreement:

> [Stacey] agreefs] to indemnify ... and reimburse you ... for ... any claim ... (including without limitation reasonable attorneys’ fees and expenses, and costs and expenses reasonably incurred, in investigating, preparing or defending against any litigation or claim), ... arising out of or in any manner incident, relating or attributable to: a. any breach or failure of any representation or warranty given by us ...; b. any failure of either of us to perform or observe ... any covenant, agreement, or condition to be performed or observed by us under this agreement or under any ... other instrument ... executed by us in connection with this agreement; ... or d. the enforcement of your rights under this agreement.

As a general rule, attorney fees may be recovered in Utah only if provided for by statute or contract. *Cooper v. Deseret Fed. Sav. and Loan Ass’n,*757 P.2d 483, 486 (Utah App.1988). If attorney fees are recoverable by contract, “[a] party is entitled only to those fees attributable to the successful vindication of contractual rights within the terms of [the] agreement.” *Trayner v. Cushing,*688 P.2d 856, 858 (Utah 1984).

The court below found that Stacey was not entitled to an award of attorney fees because it did not prevail on its complaint for acceleration. We consider this finding to be in accord with the language of the note, i.e., Golwix will pay attorney *1085fees in connection with the enforcement of Stacey’s rights under the note. Since Stacey’s attempt to accelerate the note was unsuccessful, Stacey was properly denied its attorney fees.

In regards to Golwix’s claim for attorney fees, the trial court found that it was “not entitled to an award of fees because [it] did not prevail on many of [its] counterclaims.” The letter agreement provides, however, for the reimbursement of Golwix’s attorney fees incurred in enforcing any claims for breach of warranty or failure of performance. The contractual provision is expansively written, encompassing a broad range of potential expenses connected with rights arising under the contract. The mere fact that Golwix failed to prevail on some of their counterclaims does not justify a withholding of fees to which they were contractually entitled. “Provisions in written contracts providing for payment of attorney fees should ordinarily be honored by the courts.” *Soffe v. Ridd,*659 P.2d 1082, 1085 (Utah 1983). Golwix was not only successful in its opposition to acceleration of the note, it was also successful on some of its counterclaims. Therefore, even with partial success, Golwix was entitled to attorney fees for the claims on which it was successful. *See Trayner,*688 P.2d at 858 (each party was entitled to attorney fees where each was partially successful). We conclude that the trial court abused its discretion in failing to give effect to the broad contractual language and partial success of Golwix in enforcing its contractual rights.

The decision of the trial court is affirmed in part and reversed in part. The case is remanded for further proceedings consistent with this opinion. Costs are awarded to Golwix.

GARFF and JACKSON, JJ., concur.

1

. We need not reach the issue as to whether acceleration was warranted at the time of trial since the court’s award to Golwix still exceeded the amount in arrears on the note even at that time.

2

. We do not distinguish the breach of warranty claim from the breach of contract claim as *‘[a]n *1084action for breach of warranty may sound in either contract or tort.” *Mitchell v. Pearson Enterprises,*697 P.2d 240, 247 (Utah 1985).