Cox, J.
These two actions of contract tried together arise out of an agreement for the construction of a house by Good on the land of the Howletts in Hingham for a price, which, reduced by an allowance of $575.00 for electrical work, a stove and hot water heater, amounted to $13,125.00. There is also a claim by Good for extras. The action by [122]*122Good is to recover the .contract balance and for extras. The action by the Howletts is for damages for breach of contract by Good.
The evidence was conflicting. The judge took a view at the outset of the trial and a second view at its close. He made special findings. In the action by Good, he found for the Howletts. In the action by the Howletts, he found for them in the sum of $591.47.
The largest item involved the foundations. The judge found that “Good laid the foundation to the porch of concrete block, and this was laid four (4) inches below grade. The .concrete slab making up the floor of the porch was widely separated from this foundation and some of the concrete blocks have fallen out. The concrete block foundation under the kitchen was laid twenty-two (22) inches below grade, and the concrete block foundation under the garage was laid sixteen (16) inches below grade. These foundations were not laid in a workmanlike manner in that they should have been laid three feet six inches below grade, so that the frost will not heave the foundations. In order to correct this situation, it will be necessary to remove the present foundations, excavate, and rebuild the foundations to a depth of three feet six inches. This work will have to be done in sections and the building supported while the work is being done. This will cost twelve hundred dollars ($1200.00).”
With reference to the next largest item the judge found that “Good did not properly prepare the surfaces for the papering and painting of the interior of the house. He also left [123]*123bulges in the plaster of the sidewalls of the bathroom. These conditions had to be rectified. To correct this improper work, Howlett was required to expend the sum of four hundred twenty-five dollars ($425.00). This amount was fair and reasonable.” There were other deficiencies in Good’s work.
The judge allowed Good $100.00 as an agreed extra for constructing a stairway to the ceiling. He also allowed Good as extras $15.00 for a larger kitchen window ordered by Howlett and $30.00 for a side door to the garage. He disallowed the claim by Good for an extra $200.00 for building a roof over the rear porch because he found that was included in the .contract price. He also disallowed Good’s claim for an extra $50.00 for covering flagstone on the rear porch and held that “In view of the work that will have to be done on the foundation of the back porch, the covering of the flagstone results in no value to Howlett.” The judge found, and it is not disputed, that the Howletts have paid Good $12,236.47.
The judge’s findings may be thus summarized:
[124]*124
The matters for decision arise from the action which the judge took on certain requests for rulings by Good, as follows:
“1. The plaintiff (Good) in this action is entitled to recover against the defendants on
(a) Count 1 of the declaration.
(b) Count 2 of the declaration.
(c) Count 3 of the declaration.
“ Allowed as modified by findings.
“3. The evidence warrants a finding that there has been a substantial compliance by the plaintiff with the terms of the special written contract as to those items which are set forth therein and which said items constitute the plaintiff’s entire obligation thereunder.
“ There was a substantial compliance except as to the items set forth in finding. The memorandum does not constitute the plaintiff’s entire obligation.
“4. The rights of the parties are limited to and governed by the express terms of the written contract which the parties entered into prior to the commencement of construction.
“ Denied.
The written contract prepared by Good does not contain all of the terms of the contract between Good and Hewlett.
“13. If the Court finds that the plaintiff in building the [125]*125foundation under the kitchen which is not part of the main house struck firm ground with a gravel bottom sufficient to support the said addition, then the failure to meet a requirement of the building code of the Town of Hingham with respect to the depth of the concrete should be disregarded under the circumstances disclosed in this case,
(a) where the wall constructed is of sufficient depth to provide all the needed support;
(b) where independent of the building codes, there is good and workmanlike performance.
“ Building code not material.
(a) and (b)
“ Foundation was not constructed to a sufficient depth
and not constructed in a good and workmanlike manner.
“16. The defendants’ evidence falls short of establishing a claim to damages in reduction of the plaintiff’s claim.
“ Denied.
“18. Negligence by the plaintiff in performance of a building contract does not bar recovery.
“ Negligence, under various circumstances, may bar recovery.”
Good’s requests in the action by the Howletts against him, and the judge’s action thereon, were as follows:
1. There is no evidence to warrant a finding for the plaintiffs in this case. Denied.
2. There is no evidence which would entitle the plaintiffs to recover any monetary damages in this case. Denied.
3. The plaintiffs’ action cannot be construed as an independent cause and the plaintiffs are limited at all events to recoupment in the original action, there being no right in this Commonwealth to exact punitive damages. Plaintiff has an independent cause of action and is not limited to recoupment. This request allowed re punitive damages.
[126]*126There was abundant and competent evidence to justify all the findings of the trial judge including the findings that Good had failed to fulfill his obligations under the contract in important particulars and that only compensatory damages were awarded the Howletts because of Good’s failure to perform his contract. There is no need to narrate the evidence.
Count 1 of Good’s declaration was upon quantum meruit for the balance of the contract price as well as for extras. Count 2 was upon the special contract and for extras. Count 3 was upon quantum meruit for labor and materials, including what was done and supplied under the contract as well as for the extras.
Good was not prejudiced by the judge’s treatment of requests numbers 1 and 3 in his action against the Howletts. In the light of the findings, Good could not recover on the contract because of his failure to perform it in strict accordance with its terms. Andrew v. Maguire, 305 Mass. 515. Russo v. Charles I. Hosmer, Inc., 312 Mass. 231, 232.
Nevertheless, he was held to have performed the work substantially and infer-en ti ally, at least, in good faith, and was therefore allowed the balance of the contract price and certain e'xtras. That sum, $1033.53 under the contract and $145.00 for extras — total $1,178.53 — was insufficient by $591.47 to offset the sum of $1,625.00 which the judge found was necessary to make the Howletts [127]*127whole because of the inadequate performance of the work. This treatment was, in our opinion, correct, and finds ample support in law. It is settled law that, under the circumstances of this case, the builder is entitled to receive and the owner to pay “only so much as will make the price good, deducting the loss or damage occasioned by the variation from the contract.” Hayward v. Leonard, 24 Mass. 180, 184; Champy v. Merrimack Park Auto Theatre, Inc., 312 Mass. 462; Loftus v. Lauf, 329 Mass. 374; Ficara v. Belleau, 331 Mass. 80. We see no error of law prejudicial to Good in the treatment of requests numbers 1 and 3 in the action by Good.
The judge rightly denied request number 4, and to the same effect, part of number 3, that the rights of the parties were limited to and governed by the express terms of the written contract. The judge supplemented his denial of those requests with the finding that “The written contract prepared by Good does not contain all of the terms of the contract between Good and Howlett.” A copy of the instrument appears in the margin.
“ It is true in general that evidence of a previous oral agreement between the parties to a written instrument is not admissible to vary the terms thereof, and even if admitted without objection cannot be used for that purpose, but before that rule comes into operation ‘the .court must be sure it has before it a written contract intended by the parties as a statement of their complete agreement.’ Kesslen Shoe Co. v. Philadelphia, etc. Ins. Co., 295 Mass. 123, 129.” May bury Shoe [128]*128Co. v. Izenstatt, 320 Mass. 397, 403-404. There was evidence that the house was to be like one in Cohasset. There was also evidence of plans which called for a roof over the porch on the rear of the house and a foundation under the porch. The instrument referred to contained no reference to a house in Cohasset nor to plans, nor to a foundation under the porch. To the extent that the terms of the contract rested on oral evidence, it was a question of fact for the judge to determine its provisions. Gleason v. Mann, 312 Mass. 420, 423. We are of the opinion, therefore, that on the authority of Maybury Shoe Co. v. Izenstatt, 320 Mass. 397, 403-404, the judge ruled correctly. This point is of little more than academic interest because Good has only been charged for inadequate workmanship as to portions of the structure he actually built, and which, therefore, he must have concluded were required under his agreement.
Request number 13 may be disregarded as inconsequential. The judge held, with reference to this request, that the building code was not material, and found that the “Foundation was not constructed to a sufficient depth and not constructed in a good and workmanlike manner.” There was testimony by two expert witnesses that the foundations to be properly .constructed should have gone down 3% feet below the surface. This opinion given by the two experts coincides with the requirement of the building code which the judge makes clear plays no part in his decision. There was evidence, already alluded to, [129]*129that the foundations were otherwise improperly constructed. We see no error in the denial of request number 13. Request number 16 was properly denied. There was evidence of poor workmanship in important and substantial particulars which we have already considered, and for which the Howletts were entitled to be made whole.
We see no error in the treatment of request number 18. It has not been argued and may well be treated as waived. In any event, the judge has found substantial performance rather than full performance by Good and has allowed him the full contract price reduced by the amount found necessary to make the Howletts whole under their agreement. Champy v. Merrimack Park Auto Theatre, Inc., 312 Mass. 462. Whether or not Good’s failure to fully perform was negligent is inconsequential.
Good’s requests numbers 1 and 2 in the action by the Howletts against him were rightly denied. There was evidence to warrant a finding for the Howletts. The request could not have been given. Ricciardone v. Cavelli, 334 Mass. 228, 230.
In our opinion, the judge was right in his treatment of Good’s request number 3 in the action by the Howletts. “The right to recoup is the right to have unliquidated damages ascertained and applied in reduction of the plaintiff’s demand although the defendant cannot have judgment for any excess.” Barnett v. Loud, 226 Mass. 447, 450. Tegelaar Brothers v. Hanflig, 286 Mass. 363, [130]*130367. Recoupment, therefore, would have been an inadequate remedy for the Howletts as the amount which the judge allowed' them was in excess of the balance due Good under the contract by $591.47. It should be noted, too, that the Howletts were the first to bring action.
The judge was also right in giving so much of the request as related to punitive damages. It is evident that his decision avoids punitive damages and is confined to putting the Howletts in the position they would have been if Good had fully performed' his contract. If the judge had awarded the Howletts damages of $1200.00 for the foundation and damages of $425.00 for the defective interior work, without crediting the balance of the contract price, the damages would have been punitive, for the result would have been to put the Howletts in a better position than they would have been if Good had fully carried out the .contract. “It is not the policy of our law to award damages which could put a plaintiff (Howletts) in a better position than if the defendant (Good) had carried out his contract. Magnolia Metal Co. v. Gale, 189 Mass. 124, 132-133. Snelling v. Dine, 270 Mass. 501, 506. Bucholz v. Green Bros. Co., 272 Mass. 49, 54. Associated Perfumers, Inc. v. Andelman, 316 Mass. 176, 185-186. ‘The fundamental principle upon which the rule of damages is based is compensation . .. Compensation is the value of the performance of the contract, that is, what the plaintiff would have made had the contract been performed.’ [131]*131F. A. Bartlett Tree Expert Co. v. Hartney, 308 Mass. 407, 412. There is nothing to the contrary in Stevens v. William S. Howe Co., 275 Mass. 398, 402-403.
“The plaintiff is entitled to be made whole and no more. This is true in an action against a defendant for breach of contract, albeit a wilful one, even though the same defendant in suing as a plaintiff on the same contract might be barred by the rule of Sipley v. Stickney.” Ficara v. Belleau, 331 Mass. 80. (Sipley v. Stickney, 190 Mass. 43 holds that any wilful default in the contract bars recovery.) See also Hayward v. Leonard, 24 Mass. 180, 184.
The judge’s finding for the Howletts for the sum of $591.47 establishes, in effect, the overpayment which the Howletts made to Good and the recovery of which will place them in the position they would have been if Good had fully performed his contract.
No error of law prejudicial to Good having been shown, orders should be entered in each case dismissing the report.
“A”
Builder to build 7 room .cape 32 x 26 with one car garage overhead door, asphalt driveway. No bradeing (sic). Bryant circulating hot air heat, baseboard radiators. Fireplace in living room. Knotty pine kitchen cabinets. Inlaid linoleum on kit. floor. Slideing (sic) doors in master bedroom closet. Three electrical outlets in each room. Standard plumbing fixtures. Blinds on front of hour (sic). Open stairs to be like house at 25 Westmoreland [132]*132Road. If stairs to be open to ceiling $100.00 extra.
.... for the Plaintiff,
for the Defendant.
Builder to put in shades but no screens or storm windows. Builder will allow $575.00 for electrical work including stove and hot water heater or will have work done by his electrician.
This house to be built on your land for $13,700.00.
s/ Joseph Good s/ Betty Hewlett s/ Ray Hewlett
Payments to be made as follows: