
273 N.W.2d 152 (1978)
Laverne VAN DEN HOEK, Plaintiff and Respondent,
v.
Robert BRADWISCH, Defendant and Appellant.
No. 12287.
Supreme Court of South Dakota.
December 29, 1978.
*153 Douglas Luebke, of Horstman, Braley & Luebke, Corsica, for plaintiff and respondent.
Charles Rick Johnson, of Johnson, Johnson & Eklund, Gregory, for defendant and appellant.
PORTER, Justice.

CASE SUMMARY
Plaintiff-respondent Van Den Hoek (contractor) brought this action against defendant-appellant Bradwisch (owner), seeking to recover the balance due on a contract to construct a house. The trial court entered a judgment in favor of the contractor for $5,650.00 based on a jury verdict in that amount. We hold that the trial court's instructions allowed the jury to give the contractor damages based on the contract price, whether the contractor substantially performed the contract or not. Thus the jury was not required to determine the question of substantial performance. Since this critical factual question remains undetermined, we reverse the judgment and remand for a new trial.

FACTS
The owner and the contractor entered into a contract whereby the contractor agreed to construct a house in Stickney. The contractor prepared a written agreement in April, 1973, and the parties met in May of the same year to agree on details. The owner expressed a desire to have the house completed by August 1, 1973, and the contractor said he would make an effort to complete the house as soon as possible. There was, however, no completion date in the written contract.
The contractor began construction of the house in May, 1973. During construction, the parties discussed various additions, and although the evidence conflicted, the contractor testified that the owner requested additions with a value of over $2,000.00. The parties apparently did not agree on a price for these additions to the contract.
The house was enclosed by July, 1973, and inside work continued. In July or August, the owner became dissatisfied with the pace of the work. He testified that the contractor left sometime in July or August and did not get back to the project until September 26, 1973. The owner moved into the house on October 1, 1973, even though the furnace was not hooked up and the plumbing was only partially completed.
The testimony of the parties conflicts as to occurrences after October 1, 1973. The contractor testified that he tried to come back to complete inside work on November 20, 1973, and was refused admission to the house. The owner testified that he became aware of certain construction and plumbing defects in November or December, 1973, and called a state plumbing inspector. The inspector's report is a part of the record and lists numerous violations of state plumbing regulations. The owner testified further that he never refused admission to the contractor in 1973, and that the contractor did some plumbing on December 8, 1973. The contractor said he had no recollection of being at the owner's house on December 8, 1973.
Although the parties did talk with one another during the next few months, the contractor did not attempt to complete any further work until March, 1974. By this time, mechanics liens had been filed against the property by suppliers of materials whom the contractor had not paid. The owner testified that he told the contractor to have the liens discharged before he did any further work on the house. The contractor testified that the owner refused to let him work on the house after March, 1974. He also claimed that the owner converted tools and materials left at the site.
*154 The owner claims that the construction was defective in a number of particulars. The greatest fault is said to be in the plumbing. The plumbing defects are set forth in the state plumbing inspector's report. The owner hired a plumber to correct some of these defects, but most of them remained uncorrected to the date of trial, even though the owner and his family were living in the house. The owner also claims that the electrical wiring was incomplete and that he spent nearly $400.00 to complete it. Numerous other defects and unfinished work are also claimed.
The contractor claims that the work was substantially completed, and that the owner prevented him from completing the rest and from correcting defects in original construction.
The jury returned a verdict of $5,650.00 in favor of the contractor. The trial court entered judgment in this amount. The owner appeals.

ISSUE
The issue dispositive of this appeal is: Do the instructions adequately set out the rule of substantial performance of construction contracts as it relates to the measure of damages applicable under that rule? We conclude that the instructions misdirected the jury.

DECISION
We have long recognized the rule of substantial performance of building contracts. We first stated the rule in Aldrich v. Wilmarth, 3 S.D. 523, 54 N.W. 811 (1893): "But where the builders have in good faith intended to and have substantially complied with their contract, although there may be slight defects caused by inadvertence or unintentional omissions, they may recover the contract price, less the damages sustained on account of such defects." [Emphasis supplied]. The other cases recognizing this doctrine are collected in Dixon v. Nelson, 79 S.D. 44, 48, 107 N.W.2d 505, 507 (1961).
As we said in Dixon, supra, no absolute criteria prevail whereby the courts determine whether performance is sufficient to invoke this doctrine. In Hulst v. Benevolent Hall Ass'n, 9 S.D. 144, 68 N.W. 200 (1896), we held that defects not easily remedied, and not caused by inadvertence, were sufficient to deny the contractor recovery. An important factor in this determination is whether the deviation from the contract defeats the purpose of the contract in any substantial manner. It is also important to view the extent of nonperformance in relation to the full performance promised. Dixon v. Nelson, supra.
This inquiry is essentially factual. It is thus the duty of the jury to determine whether there has been substantial performance. Hulst v. Benevolent Hall Ass'n, supra; Dixon v. Nelson, supra. We cannot substitute our judgment on factual questions for that of the jury, where sufficient evidence is presented to allow reasonable minds to reach differing conclusions.
The question of whether the performance rendered was substantial is central to this case. If performance was substantial, the contractor is entitled to recover the contract price less deductions for defects in performance. Aldrich v. Wilmarth, supra. If performance was not substantial, the contractor is entitled, at most, to the value of the benefit that he conferred upon the owner under a theory of quantum meruit or unjust enrichment, and not to the contract price minus defects. See Thurston v. Cedric Sanders Company, 80 S.D. 426, 125 N.W.2d 496 (1963); Woodford v. Kelley, 18 S.D. 615, 101 N.W. 1069 (1904). We believe that the trial court misdirected the jury on this critical issue. The fourth paragraph of instruction 31[1] tells the jury that it is to *155 deduct defendant owner's damages, if any, from the unpaid contract balance due the contractor. The jury is instructed to do so even if it finds that the contractor did not substantially perform. This instruction gives the contractor exactly the same relief whether he proves substantial performance or fails to do so. We are left to speculate whether the jury found the contractor's performance substantial. The critical question of fact remains undecided, and we must reverse for a new trial on this question.
The owner claims that the contractor's performance was insubstantial as a matter of law. On this record, we are unable to so conclude.
The owner also complains of errors in the admission of evidence and of oral evidence varying the parties' contract. Since we are unable to say that these same questions will arise on retrial, we do not reach these contentions.
The judgment appealed from is reversed, and the case is remanded for a new trial.
All the Justices concur.
NOTES
[1]  The court's instruction number 31 reads as follows:

The Defendant has already paid $16,000 on the written contract leaving a balance unpaid of $6,967.40.
In the event you find for the Plaintiff upon the contract and find no breach of contract on the Plaintiff's part, you must determine the amount of money due and owing under the terms of the contract if completed and reduce said amount by the reasonable cost to the defendant of completing the house in accordance with the contract.
In the event you find in favor of the Plaintiff on the written contract, even though same was breached, by Plaintiff but that the contract had been substantially performed, though not completed, as previously defined in these instructions, you assess damages at the contract price agreed upon by the parties, less any payments made by the defendant and less the cost to the defendant of putting the house in the condition it would have been in had the contract been performed according to its terms.
In the event you find the Plaintiff breached the contract, and that substantial performance had not been complied with, you must then determine the damages sustained by the defendant. In the event the defendant's damages, as hereinbefore defined are greater than $6,967.40, your verdict will be for the defendant on his counterclaim and against the Plaintiff for the damages you assess on the contract breach, less the above balance.
In the event the defendant's damages, are less than the balance due under the written contract of $6,967.40, the defendant cannot recover damages in excess of that amount required to complete the construction of the house in a good and workmanlike manner as contemplated by the contract if completed plus incidental damages as previously instructed.
