
890 A.2d 713 (2006)
2006 ME 7
Robert RUNNELLS
v.
Muriel J. QUINN.
Supreme Judicial Court of Maine.
Submitted On Briefs: December 13, 2005.
Decided: January 27, 2006.
*715 Aaron K. Baltes, Esq., Norman, Hanson & DeTroy, LLC, Frank K.N. Chowdry, Esq., Jensen Baird Gardner & Henry, Portland, for plaintiff.
Peter W. Schroeter, Esq., William N. Kany, Esq., Nicole L. Lorenzati, Esq., Smith Elliott Smith & Garmey, P.A., Saco, Aaron Burns, Esq., Michael J. Pearce & Assoc., LLC, Portland, for defendant.
Panel: SAUFLEY, C.J., and CLIFFORD, DANA, ALEXANDER, CALKINS, and LEVY, JJ.
ALEXANDER, J.
[¶ 1] Muriel J. Quinn appeals from a judgment entered in the Superior Court (York County, Brennan, J.) after a jury found that (1) Quinn had breached an implied contract with Robert Runnells, awarding Runnells $27,742; and (2) Runnells had breached a warranty to Quinn, awarding Quinn $14,000. Quinn asserts that the trial court erred in (1) denying her motion for judgment as a matter of law on Runnells's claim for quantum meruit/implied contract; and (2) granting Runnells's motion for partial summary judgment on Quinn's claims under the Home Construction Contract Act, 10 M.R.S. §§ 1486-1490 (2005). Runnells cross-appeals, contending that the court erred in failing to offset the jury verdicts and award one judgment and costs to Runnells as the substantially prevailing party. We vacate the grant of partial summary judgment on the Home Construction Contract Act claim, but we affirm the results of the jury's verdict.

I. CASE HISTORY
[¶ 2] The facts relevant to the appeal can be succinctly stated. Runnells is a home construction contractor. Quinn owns a residence in Saco that includes her living unit and two rental units. In early February 2001, Runnells and Quinn signed a home construction contract for renovations to Quinn's home.
[¶ 3] The initial contract set a price of $33,840 for the renovations. Runnells began work on the renovations. Quinn then determined that she needed more renovations, due in part to some personal misfortunes that required greater handicap accessibility. Accordingly, Quinn and Runnells entered into a revised contract, setting a price of $75,470 for the renovations. At the time this revised contract was signed, Quinn had paid Runnells $57,000 toward the cost of the renovations.
[¶ 4] Subsequently, Quinn requested that Runnells perform additional renovations, for which she admitted at trial she was *716 obligated to pay. No written contract or change order was signed regarding these additional renovations.
[¶ 5] Ultimately Quinn paid Runnells a total of $72,000. With the addition of the work performed as a result of oral agreements, Runnells gave Quinn a final invoice for $99,742.40, indicating $27,742.40 remaining to be paid. When payment was not made, Runnells brought a mechanic's lien complaint in the District Court. Runnells subsequently amended the complaint to include claims for breach of express and implied contract and to add a claim for defamation arising from reports made by Quinn to the Better Business Bureau and to the Department of Environmental Protection. Quinn filed a counterclaim against Runnells alleging breach of contract, negligence, breach of warranty, unfair trade practices, and violation of the Home Construction Contract Act (HCCA). The case was removed to Superior Court for a jury trial.[1]
[¶ 6] Prior to trial, the court granted Runnells's motion for partial summary judgment and dismissed Quinn's counterclaim for violation of the HCCA. After trial, the jury found for Runnells in the amount of $27,742 on his amended complaint for quantum meruit/implied contract. The jury found for Quinn in the amount of $14,000 on her counterclaim for breach of contract/implied warranty. The jury found that the other claims by each party were not proved.
[¶ 7] Within ten days of the entry of judgment, Quinn filed a renewed motion for judgment as a matter of law pursuant to M.R. Civ. P. 50(b). The court denied that motion, and this appeal followed.

II. LEGAL ANALYSIS

A. Runnells's Quantum Meruit Recovery
[¶ 8] Quinn asserts that contract law barred the jury's consideration of a quantum meruit/implied contract award for Runnells. She maintains the claim is barred due to Runnells's failure to enter into written change orders with Quinn for the contract extras when their fixed price contract unambiguously provided that there be no extra costs for change orders unless in writing.[2]
[¶ 9] Although the home construction contract required that all changes to the contract involving extra costs be in writing, this provision may be modified by the agreement of the parties. Granger N., Inc. v. Cianchette, 572 A.2d 136, 139 (Me. 1990). Such a provision does not preclude a contractor from recovering for work that was fully performed. Id. The jury's verdict establishes that the extra work at issue was requested by Quinn and performed by Runnells.
[¶ 10] Quantum meruit claims involve recovery for services or materials provided under an implied contract, which is a contract inferred from the conduct of *717 the parties. Paffhausen v. Balano, 1998 ME 47, ¶ 6, 708 A.2d 269, 271. "A valid claim in quantum meruit requires: that (1) services be rendered to the defendant by the plaintiff; (2) with the knowledge and consent of the defendant; and (3) under circumstances that make it reasonable for the plaintiff to expect payment." Id. ¶ 8 (quotation marks omitted). See also Forrest Assocs. v. Passamaquoddy Tribe, 2000 ME 195, ¶ 11, 760 A.2d 1041, 1045.
[¶ 11] Evidence in the record shows that Quinn asked Runnells to do additional work, for which she knew she would be charged additional costs. Thus, the jury could find that Runnells reasonably expected payment for this additional work that he had completed for Quinn with Quinn's knowledge. Therefore, the court did not err in denying Quinn's motion for judgment as a matter of law on Runnells's claim for quantum meruit/implied contract.

B. Set-off and Costs
[¶ 12] In his cross-appeal, Runnells asserts that the verdicts should have been offset and that one judgment in favor of Runnells should have been entered in the amount of $13,742.40. Although the court, in its discretion, could have offset the verdicts, see Albert Brothers Construction, Inc. v. Gagnon, 611 A.2d 75, 76 (Me.1992), it did not exceed the bounds of its discretion in determining that the jury verdicts should not be offset, considering that there were separate verdict forms on multiple claims.
[¶ 13] The court determined that it would not award costs to either party "because, considering the litigation as a whole, neither was a clearly prevailing party." Runnells contends that the court should have determined that he was the prevailing party, as he was awarded the entire amount of his unpaid bill, whereas Quinn was only awarded approximately half that amount on her breach of warranty claim.
[¶ 14] The governing law, 14 M.R.S. § 1501 (2005), provides that "[i]n all actions, the party prevailing recovers costs unless otherwise specially provided." The Maine Rules of Civil Procedure state that "[c]osts shall be allowed as of course to the prevailing party, as provided by statute and by these rules, unless the court otherwise specifically directs." M.R. Civ. P. 54(d).
[¶ 15] We use a functional analysis to determine who is the prevailing party for purposes of awarding costs. Landis v. Hannaford Bros. Co., 2000 ME 111, ¶ 6, 754 A.2d 958, 959-60. The nature of this inquiry is essentially one of fact; therefore, the court's determination of the prevailing party is reviewed for clear error. Id.[3] The determination of a successful party is based upon success on the merits, not just upon damages, looking at the lawsuit as a whole. Id. ¶ 7. Thus, the fact that Runnells was awarded $27,742.40 on his claim, while Quinn was only awarded $14,000 on hers, does not settle the issue.
[¶ 16] The court did not commit clear error in determining that, when looking at the lawsuit as a whole, neither party was the "winner" or the "loser," and hence there was no prevailing party. See id. ¶ 6, 754 A.2d at 959-60. As there was no prevailing party, the Superior Court properly declined to award costs.

C. The Home Construction Contract Act Claim
[¶ 17] The trial court did not state reasons for granting Runnells's motion for *718 partial summary judgment on the HCCA claim. Runnells asserts that Quinn's property is not subject to the protections of the HCCA because it contains, in addition to Quinn's living area, two rental units, and the rental units are a commercial or business purpose, excluding the building from the protections of the HCCA because it is not a "residence."
[¶ 18] "Residence" is defined in the HCCA as "a dwelling with 3 or fewer living units and garages, if any. Buildings used for commercial or business purposes are not subject to this chapter." 10 M.R.S. § 1486(5) (2005). The limitation in the HCCA to three or fewer living units would appear to contemplate that at least some of those living units might be rental units. This is confirmed in other provisions of the HCCA that anticipate that agreements might be between either contractors and homeowners or contractors and lessees. See 10 M.R.S. § 1487 (2005). Thus, residences of homeowners that include one or two rental units would qualify as a residence under the plain meaning of the term "residence" as defined in the HCCA.
[¶ 19] Section 1487 of the HCCA requires that any home construction contracts for more than $3000 (1) be in writing; (2) specify a contract price, 10 M.R.S. § 1487(4) (2005); (3) establish a limitation on down payments to no more than one-third of the total contract price, id. § 1487(5) (2005); and (4) require that any changes in the contract price as a result of changes in specifications or changes in requested work be subject to a written change order, id. § 1487(9) (2005).
[¶ 20] Summary judgment is precluded if, when the facts are reviewed, there remain disputes as to material facts relating to the viability of any claim. See Lightfoot v. Sch. Admin. Dist. No. 35, 2003 ME 24, ¶ 6, 816 A.2d 63, 65. On the available record, there appears to be a dispute as to material fact as to whether the down payment received by Runnells on the second written contract exceeded the one-third of contract price limitation in section 1487(5), and there appears no dispute that there were oral agreements between Runnells and Quinn that resulted in a significant increase in the cost of the work to be done above the $75,470 figure agreed in the last written contract.
[¶ 21] By proving his quantum meruit claim, Runnells also, effectively, proved violation of the HCCA. 10 M.R.S. §§ 1487(9), 1488 (2005). However, proof of violation of the HCCA does not exempt a homeowner from responsibility to pay for work proved to have been completed pursuant to the homeowner's request and under circumstances justifying recovery in quantum meruit. The remedies specified in the HCCA are not so broad. Pursuant to 10 M.R.S. § 1490(1) (2005), a violation of the HCCA is viewed as prima facie evidence, subject to rebuttal, of violation of the Maine Unfair Trade Practices Act, 5 M.R.S. §§ 205-A to 214 (2005). In addition, for each violation of the Act found by the court, the court may find a civil violation and order a forfeiture of not less than $100, nor more than $1000, 10 M.R.S. § 1490(2) (2005).
[¶ 22] Accordingly, the remedy for violation of the HCCA must be adjudicated independently of any determinations relating to the homeowner's responsibility to pay the contractor for work requested by the homeowner and done properly, pursuant to the homeowner's request, by the contractor. Therefore, while the matter must be remanded to the trial court for determination of the HCCA claim and evaluation of any remedies that may be appropriate, including an award of costs, this remand does not require a reopening *719 and reconsideration of the matters decided by the jury. The judgments based on the jury verdicts will be affirmed. The matter will be remanded to the Superior Court for consideration of the HCCA claim.
The entry is:
The portion of the trial court's judgment dismissing the Home Construction Contract Act claim is vacated. Remanded to the Superior Court for consideration of the Home Construction Contract Act claim. In all other respects the judgment of the trial court is affirmed.
NOTES
[1]  Runnells filed a third-party complaint against a subcontractor plumber with regard to claims made by Quinn against Runnells for the contamination of her basement with asbestos debris. The asbestos claims were settled separately, resulting in dismissal of the subcontractor from the case.
[2]  On the backside of all contracts between Runnells and Quinn are the following relevant terms:

4. The terms, conditions and representations set forth herein constitute the entire agreement between the parties, and no waiver or modifications shall be valid unless written upon [sic] attached to this contract.
7. Any alteration or deviation from the above contractual specifications that involve extra cost will be executed only upon the parties entering into a written change order.
[3]  While we review the trial court's determination as to who is the prevailing party for clear error, we review the decision to award costs to the identified prevailing party for an abuse of discretion. See Mahar v. StoneWood Transp., 2003 ME 63, ¶ 26, 823 A.2d 540, 547.
