
584 N.W.2d 97 (1998)
1998 ND 164
CIRCLE B ENTERPRISES, INC., Plaintiff and Appellee,
v.
Jim STEINKE, individually, and dba Heritage Corvette, Defendant and Appellant.
Civil No. 970384.
Supreme Court of North Dakota.
September 15, 1998.
*99 J. Thomas Traynor, Jr., of Traynor, Rutten & Traynor, Devils Lake, for plaintiff and appellee.
William J. Brudvik, of Ohnstad Twichell, Mayville, for defendant and appellant.
MESCHKE, Justice.
[¶ 1] Jim Steinke, doing business as Heritage Corvette, appealed a judgment awarding Circle B Enterprises, Inc. $20,161.01 for his breach of a contract to restore a classic car. We modify the judgment and, as modified, we affirm.
[¶ 2] In 1990, Steinke and Circle B, through its president, Jerald Bugliosi, orally agreed Steinke would restore Circle B's 1961 Corvette. When Steinke failed to do the restoration timely, Steinke and Circle B wrote an agreement, dated October 26, 1994, requiring Steinke to finish the work by April 21, 1995. The written agreement recited Circle B had paid Steinke $13,815, including $1,600 for a hard top and $2,161.01 as credit for unfinished work on the car. The agreement identified $14,094.43 in remaining work on the car and agreed, after credit for payments already made by Circle B, the balance due for the remaining work was $10,333.42. The parties' agreement specified:
In the event [Steinke] fails to complete and deliver the vehicle no later than April 21, 1995, there will then be a penalty of $100.00 per day assessed and deducted from the amount of $10,333.42, plus or minus items which have been added to the cost as set out in this agreement. Further, Circle B will then be free to contact a third party to perform what [Steinke] had agreed to perform on this vehicle, and any amount which Circle B does have to pay to that third party will be the responsibility of [Steinke]. Upon the vehicle being restored as provided in this agreement, however, Circle B will then pay to [Steinke] $10,333.42, plus or minus items which have been added to the cost as set out in this agreement.
The agreement declared "Time is of the essence in the performance of each and every term of this agreement."
[¶ 3] Steinke did not finish restoring the car by April 21, 1995. In July 1995, Circle B sued Steinke to enforce the agreement and recover possession of the car. They then provisionally agreed to extend the deadline for completion of the car to September 27, 1995, but Steinke did not finish the car by then, and it was returned to Circle B on September 28, 1995. Circle B hired another company to complete the work for $9,251.13.
[¶ 4] The trial court ruled Steinke had breached "all agreements" with Circle B. The court found Steinke had performed $11,653.99 in work on the car, and Circle B had paid for that work, leaving a credit on account with Steinke of $2,161.01. The court ordered Steinke to pay Circle B $2,161.01 for that credit. The court decided damages for Steinke's breach of contract were difficult to ascertain when the contract was made, but refused to enforce the $100 per day assessment against Steinke because it "related to the reduction in the final payment for the Corvette. The services were never completed by [Steinke] and the payment of $10,333.42 was not made to [Steinke]. The penalty clause relates to reducing the final payment for late completion of the project." The court nevertheless decided Steinke's breach resulted in Circle B not having the car available to promote its restaurants and awarded Circle B $18,000 in damages for loss of use at $3,000 per year for six years. Steinke appealed.
[¶ 5] Steinke primarily contests the $18,000 loss-of-use damages as unfounded in the pleadings and the evidence. Steinke argues he did $3,756.64 in work on the car after October 26, 1994, and the trial court erred in failing to recognize that work as an offset against the $2,161.01 credit Circle B had with Steinke at the time of the contract. Steinke contends he is entitled to be paid for that work as a matter of contract or, alternatively, as a matter of unjust enrichment. Steinke also argues the court erred in not awarding him the $1,118.29 difference between the agreed amount of $10,333.42 for the remaining *100 work and the actual amount of $9,251.13 that Circle B paid to complete the work.
[¶ 6] A contractor who fails to substantially perform may not recover at all under the contract. Dittmer v. Nokleberg, 219 N.W.2d 201, 206 (N.D.1974). Substantial performance means a contractor has performed in good faith, except as to unimportant and unintentional omissions or deviations that are the result of mistake or inadvertence. All Seasons Water Users Ass'n v. Northern Improvement Co., 399 N.W.2d 278, 281 (N.D.1987); Gross v. Sta-Rite Industries, 336 N.W.2d 359, 361 (N.D.1983). As we explained in All Seasons at 280, whether a contractor has substantially performed is a question of fact.
[¶ 7] Here, the trial court found Steinke had breached "all agreements" with Circle B. The court also found Steinke had furnished $11,653.99 in services and goods for the car. Their agreement recognized Steinke had done $10,053.99 in work on the car before October 26, 1994. Thus, the court effectively found that, after October 26, 1994, Steinke furnished only $1,600 in services and goods, an amount equal to the price of the hard top. Although the court did not make a finding about substantial performance, the written agreement specified that $14,094.43 in work remained to be done on the car on October 26, 1994. Both the court's implicit finding that Steinke furnished only $1,600 in services and goods after October 26, 1994, and Steinke's claim for $3,756.64 thereafter, represent completion of less than one-third of the work remaining on the car. We decline to characterize the magnitude of the deviations from this contract as unimportant. We hold as a matter of law Steinke failed to substantially perform his contract with Circle B, and he is not entitled to recover in contract for work performed after October 26, 1994.
[¶ 8] Still, we have recognized a contractor who has not substantially performed may often be entitled to recover outside the contract for the value of the benefit conferred under a theory of quantum meruit or unjust enrichment. Kulseth v. Rotenberger, 320 N.W.2d 920, 922 (N.D.1982). We there recognized such an action was an equitable one governed by considerations of natural justice, and we said Dittmer did not necessarily preclude recovery in quantum meruit, as distinguished from recovery in contract, for the reasonable value of goods and services rendered. Kulseth, at 922-23. In Kulseth, at 923, we cited Restatement (2nd) Contracts § 374(1) (1981) as authority for the principle that a breaching contractor may often be entitled to restitution for a benefit conferred by part performance. Under Restatement (2nd) Contracts § 374(2), however, the parties may agree that a breaching contractor is not entitled to restitution if the value of the part performance is integrated into a liquidated damages agreement.
[¶ 9] Thus, Steinke's quantum meruit argument needs an examination of the parties' written agreement, particularly the clause for assessment of $100 a day against Steinke for failure to complete the car by April 21, 1995. Primarily the construction of a written contract to determine its legal effect is a question of law. Pamida, Inc. v. Meide, 526 N.W.2d 487, 490 (N.D.1995). Contracts are construed to give effect to the mutual intention of the parties at the time of contracting. N.D.C.C. § 9-07-03; Pamida, at 490. The parties' intention must be ascertained from the writing alone, if possible. N.D.C.C. § 9-07-04; Pamida, at 490. A contract must be construed as a whole to give effect to each part if reasonably practicable. N.D.C.C. § 9-07-06. Under N.D.C.C. § 9-07-09, words of a contract are understood in their ordinary and popular sense.
[¶ 10] This written agreement specified, if Steinke failed to finish restoring the car by April 21, 1995, a "penalty" of $100 a day would be deducted from the $10,333.42 balance to be paid for the work remaining at the time of the contract, and "[f]urther, Circle B [would] then be free to contact a third party to perform what [Steinke] had agreed to perform on this vehicle, and any amount which Circle B does have to pay to that third party [would] be the responsibility of [Steinke]." Penalties imposed by a contract for nonperformance are generally void. *101 N.D.C.C. § 9-08-03. But the characterization of agreed damages for nonperformance as a "penalty" is not conclusive. See 22 Am.Jur.2d Damages § 696 (1988). N.D.C.C. § 9-08-04 authorizes liquidated damages for nonperformance of a contract, and it directs:
Every contract by which the amount of damages to be paid, or other compensation to be made, for a breach of an obligation is determined in anticipation thereof is to that extent void, except that the parties may agree therein upon an amount presumed to be the damage sustained by a breach in cases where it would be impracticable or extremely difficult to fix the actual damage.
[¶ 11] A promisee seeking to enforce a contractual clause for liquidated damages has the burden of proof under N.D.C.C. § 9-08-04. Coldwell Banker v. Meide & Son, Inc., 422 N.W.2d 375, 377 (N.D.1988). In Eddy v. Lee, 312 N.W.2d 326, 330 (N.D.1981), we outlined the foundational facts necessary to implement a liquidated damages agreement under that statute: (1) damages stemming from a breach of the contract are impractical or extremely difficult to ascertain when the contract was made; (2) the parties reasonably tried to fix their damages; and (3) the amount stipulated bears a reasonable relation to the probable damages and is not disproportionate to any damages reasonably anticipated. See Fisher v. Schmeling, 520 N.W.2d 820, 822 (N.D.1994); City of Fargo v. Case Development Co., 401 N.W.2d 529, 531 (N.D.1987). As Eddy, at 331 explains, those foundational elements are factual questions.
[¶ 12] The foundational facts sketched in Eddy are not mutually exclusive. Fisher, 520 N.W.2d at 822-23. We have construed N.D.C.C. § 9-08-04 in keeping with the modern trend to uphold liquidated damages in cases not involving adhesion contracts. Fisher, at 822-23. See Case Development, 401 N.W.2d at 533 n. 3. In Fisher, at 822-23, we explained the difficulty of estimating damages has greater importance in cases where there has been little negotiation for the liquidated damages clause, and less importance where there has been bona fide reasonable negotiations for the clause. In Case Development, at 533, we ruled the reasonable-endeavor requirement to fix damages does not require face-to-face negotiations about the amount of liquidated damages as a prerequisite to enforcing the clause.
[¶ 13] Here, Bugliosi testified the clause was included in the contract as an "incentive" and a "motivational tool" to get the car finished by April 21, 1995. Steinke testified he participated in the negotiations of the written contract, and reviewed the contract and suggested changes. This written agreement was clearly the result of bona fide negotiations for the prompt completion of the car renovation, and it was not part of an adhesion contract. The trial court found "[d]amages stemming from [Steinke's] breach of contract ... [were] difficult to ascertain at the time of contracting." The court's finding is not clearly erroneous and, under these circumstances, we conclude the agreement represented their reasonable endeavor to implement a valid liquidated damage remedy.
[¶ 14] The trial court, however, refused to implement the clause for liquidated damages and, instead, awarded Circle B $18,000 in damages based upon the court's conclusion that Circle B lost advertising use for six years at $3,000 a year. The court's calculation of damages failed to follow the valid liquidated damage remedy specified in the contract and was, therefore, erroneous as a matter of law.
[¶ 15] Under the plain language of the liquidated damage agreement, Steinke's failure "to complete and deliver the vehicle [to Circle B] no later than April 21, 1995" entitled Circle B to "$100 per day assessed and deducted from the amount of $10,333.42." The car was returned to Circle B on September 28, 1995-160 days after the agreed completion and delivery date. The effect of Steinke's failure to complete and deliver the vehicle to Circle B by April 21, 1995, results in a $16,000 assessment that first reduces the $10,333.42 contract price. Under the circumstances of this case, this clause of the liquidated damage agreement effectively reduced the $10,333.42 contract price for the remaining work to zero and authorized an assessment of $5,666.58 against Steinke for his extreme delay.
*102 [¶ 16] The second sentence of the liquidated damage agreement imposed an additional obligation on Steinke: "Further, Circle B will then be free to contact a third party to perform what [Steinke] had agreed to perform on this vehicle, and any amount which Circle B does have to pay to that third party will be the responsibility of [Steinke]." Giving effect to the plain and ordinary language of the entire liquidated damage clause, Circle B was not obligated to pay Steinke the balance due on the contract and Steinke was required to pay Circle B the $5,666.58 assessment and the third-party costs of $9,251.13 to finish restoring the car. The value of any work that Steinke did on the car after October 26, 1994, was integrated into an agreement for liquidated damages, and the integrated agreement also effectively set the amount that Steinke had to pay for his delay and for finishing the work.
[¶ 17] Under the liquidated damages clause, we conclude Steinke was not entitled to payment for any work he did on the car after October 26, 1994. We also conclude Steinke was not entitled to recover the difference between the contracted price for the remaining work, $10,333.42, and the price charged by the third party to complete it, $9,251.13. We hold Circle B is entitled to $14,917.71 as liquidated damages and to $2,161.01 for return of the credit on its account with Steinke.
[¶ 18] Therefore, we modify the judgment to award Circle B $17,078.72 in damages and, as modified, we affirm.
[¶ 19] VANDE WALLE, C.J., MARING and SANDSTROM, JJ., concur.
NEUMANN, Justice, concurring and dissenting.
[¶ 20] I agree with almost all of the majority's opinion, with the exception of the computation of liquidated damages in paragraph 15. I believe when the parties agreed to liquidated damages of "$100 per day assessed and deducted from the amount of $10,333.42," they effectively capped liquidated damages at a maximum of $10,333.42. I would not give Circle B the additional $5,666.58 awarded by the majority. I would modify the judgment to award Circle B $11,412.14 in damages, and, as modified, affirm.
[¶ 21] William A. Neumann
