
    W. W. HORTON, Surviving Partner of the Firm of Lord & Horton, v. R. H. EMERSON.
    (152 N. W. 529.)
    Contractor — special contract — substantial compliance — failing to make — quantum meruit — reasonable value to owner — amount of recovery — negligence —bad faith.
    1. Where a contractor has constructed a building under a special contract, but has failed to substantially comply with its terms, preventing a recovery on such contract, he will be permitted to recover on the quantum meruit for the reasonable value to the owner not exceeding the contract price of his labor and materials of which such owner has received and is receiving a benefit, provided the contractor did not intentionally or in bad faith neglect or omit to fulfil such contract.
    Mechanic’s lien — action to foreclose — judgment in — for defendant — quantum meruit — action on — former judgment no bar.
    2. A judgment in defendant’s favor in a former action based on the contract and for a foreclosure of a mechanic’s lien is not res judicata in the ease at bar, for numerous reasons stated at length in the opinion.
    Judgment in former suit — same parties — other action — issues different — not conclusive — tried and determined.
    3. A judgment in a former suit between the same parties is not conclusive in a subsequent action involving different issues, where it does not appear that the identical question sought to be concluded was necessarily tried and determined in such prior litigation.
    Answer in former suit — admission of amount owing — tender thereof — competent evidence in subsequent suit.
    
      4. An admission contained in defendant’s answer in a former -suit of the amount owing by him to plaintiff, and a tender of such sum to plaintiff, although afterwards withdrawn, is competent testimony in plaintiff’s behalf.
    
      Note. — The doctrine that substantial performance of a building contract will support a recovery by the builder seems to be firmly established in the United States, as shown by a full review of the authorities in a note in 24 D.R.A. (N.S.) 327, though there is a conflict as to whether a recovery will be permitted where the performance is less than .substantial; and where the performance is substantial some courts allow recovery on the contract while others allow recovery only on quantum meruit.
    
    
      Findings of fact — trial court — evidence.
    5. Evidence examined, and held, that the findings of fact of the trial court have ample support in the evidence.
    Opinion filed April 3, 1915.
    Rehearing denied May 4, 1915.
    Appeal from District Court, Ward County, Leighton, J.
    From a judgment in plaintiff’s favor and from an order denying a motion for a new trial, defendant appeals.
    Affirmed.
    
      Cowan & Adamson and H. 8. Blood, for appellant.
    • As a general rule there is no implied contract except in the absence of one expressed by the parties. 4 Cyc. 327, and cases cited; Marshall v. Jones, 11 Me. 54, 25 Am. Dec. 260.
    Where a contract provides that payment shall be made only upon the certificate of the architect, unless the plaintiff furnishes such certificate or shows that it is wrongfully withheld, no recovery can be had. Weeks v. O’Brien, 141 N. Y. 199, 36 N. E. 185; New Teleph. Co. v. Foley, 28 Ind. App. 418, 63 N. E. 56; Boden v. Maher, 95 Wis. 65,, 69 N. W. 980; Coorsen v. Ziehl, 103 Wis.'381, 79 N. W. 562; John Pritzlaff Hardware Co. v. Berghoefer, 103 Wis. 359, 79 N. W. 564; McGlauflin v. Worniser, 28 Mont. 177, 72 Pac. 428.
    Where a builder voluntarily fails to substantially comply with his contract, he cannot compel the owner to either accept the building, or to pay for it. Anderson v. Todd, 8 N. D. 158, 77 N. W. 599; Perry v. Quackenbush, 105 Cal. 299, 38 Pac. 740; Schindler v. Green, 7 Cal. Unrep. 233, 82 Pac. 631; Elliott v. Caldwell, 43 Minn. 357, 9 L.B.-.A. 52, 45 N. W. 845; Ashley v. Henahan, 56 Ohio St. 559',, 47 N. E. 573; Smith v. Brady, 17 N. Y. 190, 72 Am. Dec. 442; Anderson v. Pringle, 79 Minn. 433, 82 N. W. 682; Crouch v. Gutmann,. 134 N. Y. 45, 31 N. E. 271, 30 Am. St. Hep. 609, see note at p. 616.
    Mere occupancy and use of a building erected on lands of the owner does -not warrant an interference of acceptance of the work. 6 Cyc. 67, and cases there cited; Anderson v. Todd, 8 N. D. 158, 77 N. W. 599; Wildey v. Fractional School Dist. 25 Mich. 419; Bozarth. v. Dudley* 44 N. J. L. 304, 43 Am. Bep. 373.
    
      ' Where plaintiff has departed from his contract and has been permitted to recover, the measure has been the contract price less the amount of diminished value to the building. Smith v. Brady, 17 N. Y. Í73, 72 Am. Dec. 422.
    In a prior action, where the dismissal is because of the status of the claim, the judgment there extinguishes plaintiff’s right to recover in any subsequent action, so long as the rights of the parties remain unchanged. 24 Am. & Eng. Enc. Daw, 806, and cases cited; 23 Oyc. 1194, 1289, and cases cited; Millikan v. Werts, 14 Ind. App. 223, 42 N. E. 820.
    
      B. B. Sinister, for respondent.
    Where an action for the foreclosure of a mechanic’s lien fails, the plaintiff may sue upon a quantum meruit. Anderson v. Todd, 8 N. D. 158, 77 N. W. 599; Marchand v. Perrin, 19 N. D. 794, 124 N. W. 1114.
    The measure of such recovery is the contract price less compensation for imperfections of work or materials. In other words, a recovery may be had for the amount of added value to the owner’s property. Light-hall v. Colwell, 56 111. 108; Fuller v. Rice, 52 Mich. 435, 18 N. W. 204; Mosaic Tile Co. v. Chiera, 133 Mich. 497, 95 N. W. 537; Sheldon v. Leahy, 111 Mich. 29, 69 N. W. 76; Matthews v. Farrell, 140 Ala. 298, 37 So. 325; Higgins Mfg. Co. v. Pearson, 146 Ala. 528, 40 So. 579; Barnwell v. Kempton, 22 Kan. 314; McKnight v. Bertram Heat & Plumbing Co. 65 Kan. 859, 70 Pac. 345; Walsh v. Jenvey, 85 Md. 240, 36 Atl. 817, 38 Atl. 938; Orem v. Keelty, 85 Md. 337, 36 Atl. 1030; Gross v. Creyts, 130 Mich. 672, 90 N. W. 689; Yeats v. Ballentine, 56 Mo. 530; Keith v. Ridge, 146 Mo. 90, 47 S. W. 904; Clapper v. Mendell, 96 Mo. App. 40, 69 S. W. 669; Decker v. School Dist. 101 Mo. App. 115, 74 S. W. 390; Empire Coal & Coke Co. v. Hull Coal & Coke Co. 51 W. Va. 474, 41 S. E. 917; Cope v. Beaumont, 104 C. C. A. 292, 181 Fed. 756; Merritt & Co. v. Layton, — Del. —, 75 Atl. 795; Scholz v. Schneck, 174 Ind. 186, 91 N. E. 730; R. D. Burnett Cigar Co. v. Art Wall Paper Co. 164 Ala. 547, 51 So. 263; Rubin v. Cohen, 129 App. Div. 395, 113 N. Y. Supp. 843; Adams v. Burbank, 103 Cal. 646, 37 Pac. 640; Reed.v. Phillips, 5 111. 39.
    The disclosure of a special contract at the trial of an action on a quantum meruit will not defeat the action, but will merely limit the amount of recovery. Henderson v. Mace, 64 Mo. Appi 393; Scott v. Congdon, 106 Ind. 268, 6 N. E. 625.
    Even though such a contract was not substantially performed, the contractor still has his right of action on quantum meruit. If the property derives any benefit from the services done and materials furnished by the contractor, he must pay for their value, not exceeding' the contract price. 15 Am. & Eng. Enc. Law, 1903; Katz v. Bedford, 77 Cal. 319, 1 L.R.A. 826, 19 Pac. 523; Blakeslee v. Holt, 42 Conn. 226; Smith v. Scott’s Ridge School Dist. 20 Conn. 312; Eldridge v. Rowe, 7 111. 92, 43 Am. Dec. 41; Dermott v. Jones, 23 How. 220, 16 L. ed. 442; Rubin v. Cohen, 129 App. Div. 395, 113 N. Y. Supp. 843; Thomas v. Ellis, 4 Ala. 108; Merriweather v. Taylor, 15 Ala. 735; Taylor v. Renn, 79 111. 181; Gleason v. Smith, 9 Cush. 484, 57 Am. Dec. 62; Allen v. McNew, 8 Humph. 46; English v. Wilson, 34 Ala. 201; McKinney v. Springer, 3 Ind. 59, 54 Am. Dec. 470; Major v. McLester, 4 Ind. 591; McClay v. Hedge, 18 Iowa, 66; Morford v. Mastín, 6 T. B. Mon. 610, 17 Am. Dec. 168; Hayward v. Leonard, 7 Pick. 18l, 19 Am. Dec. 269; Freeman v. Aylor, 62 Mo. App.-613; Payne v, Hodge, 71 N. Y. 598; Aikin v. Bloodgood, 12 Ala. 221; 50 Century Dig. § 28; Caifrey v. Omilak Gold & Silver Min. Co. 4 Cal. Hnrep. 601, 36 Pac. 388; Schwartzel v. Karnes, 2 Kan. App. 782, 44 Pac. 41; Skillings v. Norris, 50 Me. 72.
    A plea of tender is an admission of plaintiff’s demand, to the-extent of the tender. Birmingham Paint & Roofing Co. v. Orampton, — Ala. • — , 39 So. 1020; Hedelhofen v. Mason, 201 III. 465, 66 N. E. 364; La Salle County v. Hatheway, 78 111. App. 95; Metropolitan Nat. Bank v. Comercial State Bank, 104 Iowá, 682, 74 N. W. 26; Mahan v. Waters, 60 Mo 167; Young v. Borzone, 26 Wash. 4, 66 Pac. 135, 421; Murray v. Cunningham, 10 Neb. 167, 4 N. W. 953; Cobbey v. Knapp, 23 Neb. 579, 37 N. W. 491.
    The pleading of a party, made and filed in another action, is competent evidence against him. 1 Enc. Ev. 424, 425; Shafter v. Richards, 14 Cal. 125; Purcell v. St. Paul F. & M. Ins. Co. 5 N. D. 109, 64 N. W. 943; Cook v. Barr, 44 N. Y. 156; O’Riley v. Clampet, 53 Minn. 539, 55 N. W. 740.
    The former judgment between these parties, which is a dismissal of the action, cannot be pleaded as res judicata in this action. Bray v. Booker, 6 N. D. 530, 72 N. W. 933; 24 Am. & Eng. Enc. Law, 775; Arnold v. Grimes, 2 Iowa, 1.
    A party seeking to avail himself of a former judgment as conclusive evidence, or as a bar to a subsequent action, must affirmatively show that the question which precludes relief in the second action was determined in the former one. Sanford v. King, 19 S. D. 334, 103 N. W. 28; Erickson v. Buss, 21 N. D. 208, 32 L.B.A. (N.S.) 1072, 129 N. W. 1025; Germania Bldg. & L. Asso. v. Wagner, 61 Oal. 349; Marean v. Stanley, 5 Colo. App. 335, 38 Pac. 395; Bice v. Marquette Opera-House Bldg. Go. 96 Mich. 24, 55 N. W. 384.
    A judgment merely denying the lien claimed will not bar an action on the debt. 23 Oyc. 1194, 1311; Geary v. Bangs, 138 111. 77, 27 N. E. 462; Selbie v. Graham, 18 S. D. 365, 100 N. W. 755; McPherson v. Swift, 22 S. D. 165, 133 Am. St. Bep. 907, 116 N. W. 76; Teigen v. Drake, 13 N. D. 502, 101 N. W. 893; Kammann v. Barton, 23 S. D. 442, 122 N. W. 418.
    It must appear that the precise question was litigated in the former action. Strother v. Butler, 17 Ala. 733; Ilanchey v. Ooskrey, 81 Ala. 149, 1 So. 259; Campbell v. Butts, 3 N. Y. 173; Davis v. Tallcot, 12 N. Y. 184; Munro v. Meech, 94 Mich. 596, 54 N. W. 290; Jepson v. International Fraternal Alliance, 17 B. I. 471, 23 Atl. 15; Carter v. Garter, 14 N. D. 66, 103 N. W. 425; 23 Cyc. 1300. , v. , ^
   Eisic, Oh. J.

Plaintiff, as surviving partner of the firm of Lord & Plorton, seeks in this action to recover upon the quantum meruit for labor and material furnished to defendant at his request in the erection of a building in the city of Minot, known as the Arcade Building. A jury was expressly waived in the district court, and at the conclusion of the trial findings of fact and conclusions of law favorable to the plaintiff were made, and pursuant thereto plaintiff had judgment for the sum of $1,792.92 and interest, together with the costs. Thereafter defendant moved for a new trial, which motion was denied, and the case is here on appeal, both from the judgment and from such order.

Before noticing the specifications of error, a brief statement of the important facts will be made. On June 3, 1907, Lord & Horton, contractors and builders of Minot, entered into a written contract with the defendant, a resident of said city, whereby such contractors undertook and agreed for and in consideration of the sum of $16,000 to erect for the defendant in such city, a two-story and basement brick structure according to certain plans and specifications therein referred to. Such contract price was to be paid as follows: $3,000 upon the completion of the foundation for such building, $6,000 when the brick work was completed and the roof on and the window openings closed up, and the final payment of $7,000 within thirty days after the completion of the building and when certificates for the same are issued.

That between June 15, 1907, and January 15, 1908, the said firm of Lord & Horton furnished the necessary labor and material for such building, and caused the same to be erected under the contract aforesaid, and shortly after the completion of such building the defendant went into possession thereof and occupied the same continuously until the trial. That he has made payments on such contract aggregating $13,600.

In March 1908, Lord & Horton commenced an action in the district court of Ward county against the defendant for the purpose of foreclosing a mechanic’s lien which they had theretofore filed against said building for the balance alleged to be due them under such written contract. Defendant answered the complaint in such action, and among other things alleged: “Defendant further alleges that heretofore, to wit, and on or about the 4th day of February, 1908, this defendant tendered in lawful money of the United States, to the said Lord & Horton, the sum of seventeen hundred ninety-two and ninety-two hundredth dollars ($1,792.92), that being the whole sum due and payable under the terms and conditions of said contract, after deducting the items of damage hereinbefore specified, and alloiuing for all just claims due to said plaintiffs, which said tender was by said plaintiffs refused, and thereupon this defendant did, on said 4th day of February, 1908, deposit in the Second National Bank of Minot the said sum last above mentioned to the order of said Lord & Horton; that said sum is at the date hereof on deposit in said bank, to the order of said plaintiffs, and is sufficient in amount to completely pay said plaintiffs all sums due and owing to said plaintiffs.” Also, “that the said sum so specified still remains on deposit in said bank, and this defendant now offers to produce the same in court, in full payment of all claims of said plaintiffs.” That as thus alleged defendant in fact made such tender and deposit, but prior to tbe trial of said action withdrew the same and amended his answer accordingly. On February 4, 1908, defendant caused to be served upon Lord & Horton a written notice as follows: “You will please take notice that I have this day deposited to your credit in the Second National Bank of Minot, North Dakota, the sum of $1,792.92, and directed said bank to pay the said amount to you upon receipt from you in full for all accounts by me owing to you this day.”

Such foreclosure action came on for trial before the late Judge Charles F. Templeton of the first judicial district, and at the conclusion of the trial findings of fact and conclusions of law favorable to the defendant were made and judgment entered dismissing the action. The gist of these findings of fact is to the effect that Lord & Horton, the plaintiffs, failed to comply with the contract in numerous particulars detailed in such findings, clearly showing a failure to substantially perform the contract. It is a very significant fact which must not be overlooked that this distinguished jurist, who possessed a keen legal mind and a high sense of equity and justice, not only did not find as a fact that plaintiffs wilfully or intentionally departed from the terms of the contract, but he expressly refused to so find. We have examined his original findings of fact and conclusions of law, which disclose that he refused' to make the following finding: “The court further finds as conclusions of fact that the plaintiffs did not intend to comply with the contract and did intend in some particulars at least to deceive the defendant, Emerson, with reference to what was being furnished, and did endeavor to deliver second and third class work and material in place of first-class; that the plaintiff took no care, and, in places at least, did not intend to follow the plans and specifications with reference to the matters of construction resulting in a very inferior combination, greatly damaging the building; that the building is damaged by virtue of failure to comply with the plans and specifications in the sum of not less than $3,431.10, thus offsetting the whole amount claimed to be due by the plaintiffs.” The refusal to make such requested findings, as well as the refusal of various conclusions of law requested, unmistakably disclose that it was the intention .of Judge Templeton to hold merely that no recovery could be had by plaintiffs on the contract, and he studiously avoided making any finding or conclusion which would in the least hamper or interfere with plaintiffs’ right to recover upon the quantum meruit. His letter addressed to plaintiffs’ counsel and which was introduced in evidence in the case at bar, fully corroborates us in the foregoing statement. The letter is as follows:

Grand Forks, N. D., Oct. 26-, 1908.

L. W. Gammons,

Minot, N. D.

Dear Sir:—

I have yours of the 24th regarding the case of Lord & Horton v. Emerson. My view of the case is that the present action should be dismissed upon the merits. The action is brought upon the contract to foreclose a lien. An action of this nature under the terms cannot be maintained, because there was not a substantial compliance with the contract, and the architect’s certificate was not fraudulently or arbitrarily withheld. That this action cannot be maintained under these circumstances, see Anderson v. Todd, 8 N. D. 158, 77 N. W. 599. As the lien cannot be upheld, plaintiffs cannot in this action recover a money judgment. Bray v. Booker, 6 N. D. 526, 531, 72 N. W. 933. I should not find all of the defendants proposed findings in any event. If you wish to submit a transcript of the testimony and argue the matter before I sign any findings, I will give you a reasonable time to do so.

Let me know your desire in the matter by early mail, as I am anxious to dispose of it.

'Tours truly,

Charles F. Templeton.

At the trial of the present action but little testimony was introduced. The only evidence offered as to the reasonable value of the -work and materials that went into the construction of such building was by stipulation that if one of plaintiff’s witnesses, w'ho was absent, were present and sworn he would testify that such reasonable value was $16,355.15. Proof w'as then offered to show' that the plaintiff, Horton, is the surviving partner of the'firm of Lord & Horton. Defendant was then called -for cross-examination, and testified’ to the fact that he took possession of the building shortly after its completion and has been in possession ever since; also that he paid to Lord & Horton on the contract the sum of $13,600; also that he tendered to Lord Horton prior to the commencement of the foreclosure action, the said sum of $1,792.-'92, and deposited the same to their credit in the Second National Bank, and served written notice of such deposit. He also testified that in his prior answer in the foreclosure suit he alleged the making of such tender and deposit as above stated, and also that he subsequently withdrew such deposit. The portion of his answer in such foreclosure suit relative to the tender and deposit and notice thereof as aforesaid was offered in evidence by plaintiff’s counsel.

Among other things, defendant testified relative to his entering into possession of the building as follows:

Q. You did, however, in the fall of 1908, a short time after Lord & Horton had quit work on the building, go into the building and commenced to use it ?
A. Yes, sii’.
Q. You used all parts of the building ?
A. Yes, sir.
Q. And went into full control of the building, with full and complete control of the building, did you? Did you have full control of the building?
A. Expect I did.
Q. You expect you did; don’t you know ?
A. I accepted — but never got an order from the architect.
Q. Did you have to have an order from the architect to have control of the building?
A. Don’t know.
Q. You did have control ?
A. We went in.
Q. You know you had control of the building?
A. I suppose so.
Q. You don’t suppose, you know?
A. I did then.

Plaintiff then offered in evidence the letter from Judge Templeton heretofore quoted, after laying a foundation therefor, whereupon plaintiff rested.

Defendant then identified the exhibit “A” being the contract for the construction of said building, and offered the same in evidence, and proved by plaintiff, who was called for cross-examination, that he is seeking in this action to recover for the identical work and materials covered by such contract.

Defendant then offered in evidence the record of the judgment in the prior action, together with the judgment roll, consisting, among other things, of the pleadings, of findings of fact and conclusions of law, and the exhibits attached thereto, all of which were objected to by plaintiff’s counsel. The foregoing is in substance all of the testimony offered in the case at bar.

x\ppellant sets forth 12 so-called specifications of error, but they are treated under five points or subdivisions of their brief, which points we will notice only in a general way. Under point 1 counsel seem to contend that it was error to permit plaintiff in this action to prove the reasonable value of the material and labor which went into such structure. They call attention to the general rule that where parties have made an express agreement the recovery must be had on such contract, or not at all. It is, no doubt, true, as they contend, that as a general rule no implied contract can be found to exist in the face ■of an express contract entered into by the parties, but this general rule has an exception which is universally recognized by the courts. We shall not attempt to cite more than a few of the authorities recognizing such exception. Anderson v. Todd, 8 N. D. 158, 77 N. W. 599; Marchand v. Perrin, 19 N. D. 794, 124 N. W. 1112; Sheldon v. Leahy, 111 Mich. 29, 69 N. W. 76; Columbus Safe Deposit Co. v. Burke, 32 C. C. A. 67, 60 U. S. App. 253, 88 Fed. 630; Scholz v. Schneck, 174 Ind. 186, 91 N. E. 730; Merritt v. Layton, 1 Boyce (Del.) 212, 75 Atl. 795; Henderson v. Mace, 64 Mo. App. 393; Geary v. Bangs, 138 Ill. 77, 27 N. E. 462; Manning v. School Dist. 124 Wis. 84, 102 N. W. 356; Sutherland, Damages, 3d ed. § 711; 30 Am, & Eng. Enc. Law, 1224-1227, and cases cited.

It is, no doubt, true that in order to recover on such implied contract it must appear that the contractor in good faith endeavored to comply with his contract, and also that his labor and material have added value to the owner’s property, resulting in a necessary benefit accruing to him. In a few states, notably Wisconsin and California (Manning v. School Dist. 124 Wis. 84, 102 N. W. 356; Zottman v. San Francisco, 20 Cal. 96, 81 Am. Dec. 96) a recovery cannot be had on the quantum meruit, even though the contractor has in good faith partly performed his contract resulting in some enrichment of the proprietor, without proof of acceptance other than such as may be inferred from the mere fact that the improvement is retained and used. Judge Marshall of the Wisconsin court, while following the earlier precedents in his state, admits that there are many respectable authorities in other jurisdictions to the contrary. In this jurisdiction the question is one of first impression, and we therefore feel free to adopt the rule which seems to be more equitable and in accord with the weight of modern authority. Such rule is stated in 3 Sutherland on Damages, 3d ed. § 111, as follows: “But there is generally a more liberal consideration of the equitable rights of the contractor where he has in good faith endeavored to comply with his contract, and his labor has added value to his employer’s property, and a benefit necessarily accrues to him. Independently of any election to accept, the honesty of the contractor’s efforts towards full performance, the beneficial character of the work, and the impossibility of the employer declining and rejecting it so that the contractor may make it useful to himself, have induced the courts to adopt the rule of awarding compensation to the contractor to the extent that the employer is thus benefited. As early as 1828 this rule was acted upon in Massachusetts, and it has been repeatedly approved in later cases there as well as elsewhere. It was thus stated as a question on which there were many conflicting opinions: ‘Whether when a party has entered into a special contract to perform work for another, and to furnish materials, and the work is done and the materials furnished, but not in the manner stipulated for in the contract, so that he cannot recover the price agreed by an action on that contract, yet, nevertheless, the work and materials are of some value and benefit to the other contracting party, he may recover on a quantum meruit for the work and labor done, and'on a quantum valebant for the materials. AVe think the weight of modern authority is in favor of the action, and that, upon the whole, it is conformable to justice that the party who has the possession and enjoyment of the materials and labor of another shall be held to pay for them, so as in all events he shall lose nothing by the breach of the contract/

“The sole ground upon which a contractor is entitled to anything under this rule is that if he were not paid something the defendant would profit at his expense, although his claim is without merit as far as rights under the contract are concerned. Hence the amount which may be recovered is the amount by which, were no payment made, the defendant would profit at the plaintiff’s expense; that is to say, the amount which represents the fair market value of the structure which, against the wishes of the defendant, has been put upon his land. This value the plaintiff must prove before he can recover. If the contract is a beneficial one to the landowner the contractor is not entitled to recover any margin of the benefit which the former secured by the making of the contract; but the contractor is entitled to the value of the building as it is in the light of the landowner’s right to have the building built, and properly built, for the contract price. If, for example, the landowner secured by his contract the erection for $2,000 of a building worth $3,000, and the plaintiff, in erecting the building, fails to comply with the contract in matters going to the essence of the contract, and the building, erected as it is erected, is worth $2,500, the plaintiff is not entitled to recover $2,500; all that he is entitled to recover is 2%o of $2,000. The additional value of the land to the owner by reason of the labor and materials performed and furnished may, at least in many cases, be ascertained by deducting from the contract price what the house was worth less to the defendant by reason of the deviations from the contract.

“The doctrine is firmly established in Vermont that where a contract has been substantially, though not strictly, performed; where the party failing to perform according to its terms has not been guilty of a voluntary abandonment or wilful departure therefrom, has acted in good faith, intending to perform according to the stipulations, and has failed in a strict compliance with its provisions; and when, from the nature of the contract and of the labor performed, the parties cannot rescind, and stand in stain quo, but one of them must derive some benefit from the labor or money of the other, in such cases the party failing to perform strictly may recover of the other as upon a quantum meruit for such sum only as the contract, as performed, has been of real and actual benefit to tbe other party, estimating such benefit by reference to the contract price of the whole work. • The rule is treated as a relaxation from the strictness of the ancient law, standing upon the solid ground of necessity and equity, but to be guarded with care, lest in its. application it should tend to impair the obligation and faithful performance of agreements. The contractor must have intended in good faith to fulfil the terms of the contract; its spirit must be faithfully observed, though the very letter of it fail. A voluntary abandonment or a wilful departure from its stipulations is not allowed. The principle applies only in cases where the contract cannot be rescinded, and where, from its nature, the labor performed under it must inure to the benefit of the employer, and it would be inequitable for him to retain it. without making compensation. The party failing to perform can only recover such a sum as his labor has benefited the other. Had he strictly and literally kept his agreement, he would have been entitled to the-contract price. Failing in this: 1st. He must deduct from the contract price such sum as will enable the other party to get the contract completed according to its terms; or, where that is impossible or unreasonable, such sum as will fully compensate him for the imperfection in the work, and the insufficiency of the materials, so that he shall in this respect be made as good pecuniarily as if the contract had been, strictly performed; 2d. He must also deduct from the contract price - ■whatever additional damages his breach may have occasioned to the other.

“The substantial performance which is mentioned as requisite to-bring a case within this equitable principle is not that near approach to perfect and complete fulfilment of the contract which is necessary to entitle the contractor to recover on it. In one case the contractor was. reported to deserve about half price and was allowed to recover. In another, he agreed to build a stone wall 4-|- feet high, and more than half of it was less; but it was held that the contract was substantially - performed for the purpose of that remedy. . . .

“The principle enunciated in these cases has been applied in Connecticut. It is there held by a majority of the court that, if the result, of a builder’s labor is a structure adapted to the purpose for which it was designed, and the employer is in the use and enjoyment of it, and it cannot be made to conform to the contract otherwise than by the ex— penditure of a sum which would deprive the contractor of all compensation for his labor, a deduction may be made from the contract price to the amount of the diminution in value of the building, and not the amount it would cost to make it conform to the contract. Principles more or less liberal have been declared in other' states in favor of defaulting contractors who have performed in part, and from whose work the employer in fact derived a benefit, and recoveries permitted on a quantum meruit for a beneficial performance which was ilot sufficient to support an action upon the contract, either on the ground of voluntary appropriation, or the benefit the employer must necessarily derive from the work as done.”

We have quoted at much length from this author because of the very clear statement of the rule which we adopt in this jurisdiction, as not only sound on principle, but having the support of the great weight of authority.

By applying this rule to the facts before us, we have no hesitation in overruling appellant’s contentions under all his points, provided the contractors are not, under the evidence, to be charged with bad faith in deviating from the plans and specifications. Even under the restricted ride adhered to in a few jurisdictions as to acceptance of the building by the owner, we think plaintiff should recover, for the testimony of the defendant himself shows that he not only paid $13,600’ on the contract, but that he accepted the building shortly after its completion and has retained the same ever since. True, he should not be held to have accepted the same as a full compliance with the contract (Anderson v. Todd, 8 N. D. 158, 77 N. W. 599), but in the light of these facts, together with the fact that admittedly he thereafter tendered to the contractors the further sum of $1,792.92 and conceded by his answer that this balance was due after deductions for damages occasioned by failure to fully comply with the contract, we think warrants the presumption that he voluntarily accepted the benefits flowing to him from such partial performance of the contract.

Where, we ask, is the proof of bad faith ? We have set out practically all the testimony, and there is not a scintilla of evidence in this record from which the court would be warranted in finding bad faith, unless such proof is furnished in the judgment roll in the prior action. It. is contended that the findings contained in such judgment roll furnish conclusive evidence of bad faith and an intentional and wilful departure from the terms of the contract; but such contention is devoid of merit for obvious reasons. First, as we have above observed, Judge Temple-ton expressly refused to so find. This is alone conclusive against appellant’s contention. Second, the sole, and in fact the only, competent purpose of introducing such judgment roll was to show a former adjudication, as pleaded in the answer, of the issues sought to be litigated in the case at bar. Manifestly, such proof falls far short of the mark. The first essential to proof of res judicata is wholly lacking. The issues in the two actions widely differ. Proof which would support one cause of action would not support the other. In the foreclosure suit, proof of a failure in any respect to substantially perform the contract would defeat a recovery, but not so in the case at bar. Bad faith or intentional departure from the contract in substantial particulars was not necessarily involved in the former litigation; nor does the answer in the case at bar, much less the proof, allege or show that any such issue was in fact litigated in the prior suit, or that it formed any basis whatever for the judgment therein rendered, but the contrary is true, as we have above observed. It necessarily and logically follows that in this action w'e cannot look to the judgment roll in the former case for evidence of bad faith or a wilful or intentional departure from the contract.

The doctrine as to when and upon what conditions a former judgment may be successfully urged as res judicata in a subsequent action is too well settled to require extended discussion. In the early history of this court the rule was correctly announced and applied in Fahey v. Esterley Mach. Co. 3 N. D. 220, 44 Am. St. Rep. 554, 55 N. W. 580. We quote from the opinion of Mr. Justice Corliss: “The case we have to decide falls within that class of cases where a judgment on one cause of action is sought to be used as conclusive in a suit on another cause of action. In such cases the judgment is final only as to the matters which were in fact determined in the former case and adjudicated by the judgment. Foye v. Patch, 132 Mass. 105, and cases cited; Stone v. St. Louis Stamping Co., 155 Mass. 267, 29 N. E. 623; Cromwell v. Sac County, 94 U. S. 351, 24 L. ed. 195; Nesbit v. Independent Dist. 144 U. S. 610, 36 L. ed. 562, 12 Sup. Ct. Rep. 746; Bell v. Merrifield, 109 N. Y. 202, 4 Am. St. Rep. 436, 16 N. E. 55. The least uncertainty as to what was in fact determined in the suit before the justice of the peace is fatal to the use of the judgment as an estoppel on the question of breach of warranty and rescission. The uncertainty created by the record of the proceedings before the justice is not in any manner cleared up by allegations in the answer that the question was in fact determined by the justice against the defendant therein, the plaintiff in the case at bar. ‘According to Coke, an estoppel must be certain to every intent; and if upon the face of a record anything is left to conjecture as to what was necessarily involved and decided, there is no estoppel in it when pleaded, and nothing conclusive in it when offered as evidence. It is undoubtedly settled law that a judgment of a court of competent jurisdiction, upon a question directly involved in one suit, is conclusive as to that question in another suit between the same parties. But to this operation of the judgment it must appear, either upon the face of the record, or be shown by extrinsic evidence, that the precise question was raised and determined in the former suit. If there be any uncertainty upon this head on this record, — as, for example, if it appear that several distinct matters may have been litigated, upon one or more of which the judgment may have passed without indicating which of them was thus litigated, and upon which the judgment was rendered, — the whole subject-matter of the action will be at large, and open to a new contention, unless this uncertainty be removed by extrinsic evidence showing the precise point involved and determined.’ Russell v. Place, 94 U. S. 606, 24 L. ed. 214. To same effect are Bell v. Merrifield, 109 N. Y. 202, 4 Am. St. Rep. 436, 16 N. E. 55; Stowell v. Chamberlain, 60 N. Y. 272; Stone v. St. Louis Stamping Co. 155 Mass. 267, 29 N. E. 623; Cook v. Burnley, 45 Tex. 97; McDowell v. Langdon, 3 Gray, 513; Downer v. Shaw, 22 N. H. 277; Chrisman v. Harman, 29 Gratt. 494, 26 Am. Rep. 387; Lea v. Lea, 99 Mass. 493, 96 Am. Dec. 772.” See also Carter v. Carter, 14 N. D. 66, 103 N. W. 425, to the same effect. In Geary v. Bangs, 138 Ill. 77, 27 N. E. 462, the court, in speaking on this identical point, said: “The next point made is that the special plea setting up the proceedings and final judgment in the mechanic’s lien suit presented a complete defense to the action in this case. The plaintiff’s right to a mechanic’s lien depended upon principles essentially different from those upon which his right to recover for his work and labor performed and materials furnished in an action of assumpsit are based. To maintain his lien he was required to allege and prove a case within the provisions of the mechanic’s lien law, and it is therefore apparent that he was liable to be defeated in that proceeding upon various grounds which would have no bearing upon his right to recover in assumpsit. Neither the plea, nor the evidence offered under it, indicated the'precise ground upon which the mechanic’s lien was denied, but only the general fact that the proceeding resulted in a final judgment denying the plaintiff his lien. We are therefore unable to see how the facts thus jxresented can be held to amount to a defense of res judicata,, or estoppel.” See also 23 Cyc. 1297-1309, and cases cited. Also Draper v. Medlock, 2 Ann. Cas. 650, and note (122 Ga. 234, 69 L.R.A. 483, 50 S. E. 113).

The foregoing sufficiently answers in a general way the various contentions of appellant, with the exception of the specifications challenging the correctness of the finding as to the reasonable value of the work and material furnished by said contractors in the construction of such building. It is undoubtedly true that the burden was on plaintiff to establish such reasonable value, but we think the finding challenged has ample support. In fact the only testimony offered at all consisted of the stipulation that a witness for plaintiff, if present and sworn, would testify “that the reasonable value of the materials, work, and construction of the building described in the complaint amounted to $16,355.15,” together with the proof as to the admission by defendant in his original answer in the foreclosure case of the fact that, after deductions for damages occasioned by failure to fully perform the contract, there remained due to the contractors only the sum of $1,792.92, payment of which sum was tendered to the contractors by him and such tender kept good by deposit. The trial court evidently accepted such admission as sufficient proof upon this issue, and we think he was fully warranted in so doing. It is well settled that such admission was competent ’ evidence of the fact thus admitted, where, as here, it was shown by the defendant himself that it was incorporated in his answer with his knowledge and consent. 1 Enc. Ev. 424, 425; O’Riley v. Clampet, 53 Minn. 539, 55 N. W. 740; 16 Cyc. 969 — 971.

The judgment of the District Court not only has ample support in the evidence, but it appears to be clearly just and free from error, and the same is accordingly affirmed.

Goss, J., not participating.  