The plaintiff Dodge made a contract in writing to erect a large building for the defendants in North Adams. He received many payments under the contract, and afterwards brought this suit to recover the balance of the contract price. Having become a bankrupt, his trustee was permitted to come into court and prosecute the suit By agreement of parties the case was referred to a referee whose determination of all matters of fact was to be final, his decision of questions of law being subject to review by the court. He reported that the plaintiff was not entitled to recover, and judgment was ordered for the defendant on his report. The case comes before us on an appeal by the plaintiff, which presents for our consideration all questions of law that appear of record.
The declaration contains three counts, two upon the contract and one upon an account annexed. The plaintiff now concedes that he is not entitled to recover upon the contract, and he relies upon the common counts, which are open to him under the count upon the account annexed.
*368The price fixed by the contract was $96,500. It was admitted that the defendants were entitled to an allowance of $90 for a saving in the price of face brick, and that payments have been made amounting to $87,195. Nine thousand eight hundred and fifteen dollars is the balance claimed in this action.
There were many particulars in which the defendants contended that the plaintiff failed to perform his contract. In regard to some of these the findings of the referee were for the plaintiff. But besides the plastering, of which we shall speak hereafter, there were ten different particulars in which it was found that the contract was not performed, for each of which the defendants would be entitled to an allowance, if they were obliged to pay at all. The deductions that ought to be made on account of these departures from the contract were found by the referee to amount in the aggregate to $4,071. It is not contended that any error of law entered into these findings.
The specifications in regard to the plastering provided, among other things, that the first coat for the whole building should be “ good lime and hair mortar and mixed when used in with adamant plaster, two bags of adamant to one hod of lime mortar.” They declared that “ This mixture must be strictly adhered to without any deviation whatever.” The findings on this point are as follows : “ The ‘ adamant ’ referred to in these specifications is a patented composition of the class commonly called hard plasters. It contains a considerable amount of plaster of Paris. It sets more quickly than lime and mortar plastering and gives a hardér surface, less liable to injury from blows of any kind, and is quite commonly used in modern office buildings. It is somewhat more expensive than lime and mortar plastering. I find that in plastering this building the plaintiff used less than half the adamant called for by the specifications. I find that this was an intentional departure from the contract in a substantial matter, which cannot be remedied afterwards without disproportionate expense. I further find that the composition of the plaster was not known to the architect until after the certificates given by him under the contract had all been issued. I therefore find that the plaintiff is not entitled to recover in this action. ... I find that the cost of removing the plastering in the building and replastering with plaster mixed in accordance with the specifications, in-*369eluding the necessary retinting of walls, would be seven thousand dollars ($7,000). But I further find that the owner would not be justified in incurring such expense, and that the difference between the value of the building as actually plastered and as it would have been, if plastered in accordance with the specifications, is eight hundred dollars ($800).”
The plaintiff contends that the conclusion of the referee in this particular is erroneous in law, and that the judgment should be reversed. This contention seems to be two fold: first, that an intentional departure from the contract in a matter of this kind will not preclude the contractor from recovering on a quantum meruit; and, secondly, that, as matter of law, the referee could not find that there was not a substantial performance of the contract. It becomes necessary to consider the law of Massachusetts in these particulars.
It is to be noticed, first, that the question whether there was a substantial performance of the contract is to be determined in reference to the entire contract, and what was done or omitted under it, and not in reference to the plastering alone. The referee might well find that the plaintiff failed to perform the contract substantially, in view of all his departures from it, even if he would not have made that finding upon the defective plastering alone. The validity of the finding must be determined in reference to all the facts of the case. But as the referee indicates that this breach is the principal reason for his decision, we will consider this branch of the case by itself.
Formerly it was generally held in this country, as it is held in England, that a contractor could not recover under a building contract, unless there was a full and complete performance of it, or a waiver as to the parts not performed, and that he could not recover on a quantum, meruit after a partial performance from which the owner had received benefit, unless there had been such subsequent dealings between the parties as would create an implied contract to pay for what had been done. Smith v. Brady, 17 N. Y. 173,185. Ellis v. Hamlen, 3 Taunt. 52. Munro v. Butt, 8 E. & B. 738. Sumpter v. Hedges, [1898] 1 Q. B. 673, and cases cited. But in most of the American States a more liberal doctrine has been established in favor of contractors for the construction of buildings, and it is generally held that if a *370contractor has attempted in good faith to perform his contract and has substantially performed it — although by inadvertence he has failed to perform it literally according to its terms — he may recover under the contract, with a proper deduction to the owner for the imperfections or omissions in the performance. Woodward v. Fuller, 80 N. Y. 312. Phillip v. Gallant, 62 N. Y. 256. Nolan v. Whitney, 88 N. Y. 648. Oberlies v. Bullinger, 132 N. Y. 598. Elliott v. Caldwell, 43 Minn. 357. Jones & Hotchkiss Co. v. Davenport, 74 Conn. 418. Pitcairn v. Philip Hiss Co. 113 Fed. Rep. 492. Page on Contracts, §§ 1603, 1604, and cases cited. It would seem that in cases of this kind, while the plaintiff recovers under the contract not the contract price but the contract price less the deduction, he ought to aver, not absolute performance, but only substantial performance of his contract and a right to recover only the balance after allowing the owner a proper sum for the failure to do the work exactly in the way required. Spence v. Ham, 163 N. Y. 220. The rule very generally adopted is that, to entitle the plaintiff to recover, he needs to show only that he proceeded in good faith in an effort to perform the contract, and that the result was a substantial performance of it, although there may be various imperfections or omissions that call for a considerable diminution of the contract price. The reason for this construction of such contracts is in part the difficulty of attaining perfection in the quality of the materials and workmanship, and of entirely correcting the effect of a slight inadvertence, and the injustice of allowing the owner to retain without compensation the benefit of a costly building upon his real estate, that is substantially, but not exactly such as he agreed to pay for. In none of the courts of this country, so far as we know, is the contractor left remediless under conditions like those above stated. The recovery permitted is generally upon the basis of the contract, with a deduction for the difference between the value of the substantial performance shown and the complete performance which would be paid for at the contract price.
In Massachusetts the hardship upon the contractor of leaving him without compensation, if, acting in good faith he performs a contract substantially, but fails to perform it completely, was early recognized by the courts, and it was decided that under *371such circumstances he might recover upon a quantum meruit. In Massachusetts this method of obtaining relief has ever since been treated as the only one for such cases, and has often been referred to as the doctrine stated in Hayward v. Leonard, 7 Pick. 181, 186. Because of this rule it is held to this day that, if the declaration is upon the contract alone, there can be no recovery under a building contract unless there has been a complete performance of it. Allen v. Burns, 201 Mass. 74, and cases cited.
This anomalous form of proceeding in this Commonwealth does not give the plaintiff any larger rights than those stated above, under the rule which generally prevails in actions upon a building contract in other States. In the first place, it has always been held that he cannot recover upon a quantum meruit unless he has acted in good faith under the contract, in an endeavor to perform it. Burke v. Coyne, 188 Mass. 401. Sipley v. Stickney, 190 Mass. 43. If he abandons the contract without excuse when he has only half performed it, he has no remedy. Homer v. Shaw, 177 Mass. 1. In both these particulars the contractor is governed by the same rules as those which are adopted generally in other States. Hayward v. Leonard, 7 Pick. 180. Powell v. Howard, 109 Mass. 192. Atkins v. Barnstable County, 97 Mass. 428. Cullen v. Sears, 112 Mass. 299. Blood v. Wilson, 141 Mass. 25. Gleason v. Smith, 9 Cush. 484. Wagner v. Allen, 174 Mass. 563. Bee Printing Co. v. Hichborn, 4 Allen, 63. Reed v. Scituate, 5 Allen, 120.
We think that the referee’s finding of fact that the plaintiff was guilty of an intentional departure from the contract, in a substantial matter, is conclusive against his right to recover, as well under the rule in Massachusetts as it would be under that in other States. It shows a lack of good faith on the part of the plaintiff in his dealings with the defendants under the contract. We think the findings and decision of the referee, taken together, are a finding that there was not a substantial performance of the contract. On both grounds the report was rightly confirmed and judgment was rightly ordered for the defendants.
Judgment affirmed.