
    LUSK LUMBER CO. v. INDEPENDENT PRODUCERS CONSOLIDATED, ET AL. 
    
    (No. 1235;
    October 5, 1926;
    249 Pac. 790.)
    Pleading — Contracts—Allegation of Performance — Error in Overruling Demurrer Not Waived by Answer — Appeal and Error —Substantial Performance — Recovery Where Defects Are Slight — Instructions.
    1. Petition in action on contract for sale, removal, and reconstruction of oil well drilling rig, which alleged only-substantial performance, held defective for failure to state facts to show such performance.
    2. In action on contract rather than on quantum meruit or quantum valebant, petition should allege performance or sufficient excuse for nonperformance.
    3. Plaintiff not alleging due performance of all conditions, as authorized by Oomp. St. 1920, § 5681, should allege specifically facts showing performance of conditions.
    4. Allegation that plaintiff has “substantially” performed contract is not equivalent to allegation, under Oomp. St. 1920, § 5681, that he has “duly” performed. '
    5. Under Oomp. St. 1920, § 5653, error in overruling demurrer to petition on ground that it does not state cause of action is not waived by defendant’s answering and proceeding to trial.
    6. Error in overruling demurrer to petition may be harmless, as where answer or reply supplies allegations omitted from petition.
    
      7. Overruling demurrer to petition, which alleged substantial performance of contract to sell, remove, and reconstruct oil drilling rig, but did not allege facts constituting such performance, held not harmless error.
    8. Doctrine of substantial performance is not confined to cases involving building contracts.
    9. Plaintiff, to claim compensation for substantial performance, must not have willfully defaulted.
    10. Plaintiff cannot recover on theory of substantial performance if defects are so serious as to deprive property of its value for intended use, or if deduetion-of damages will not be fair eompens'ation.
    11. Benefit or lack of benefit to adverse party from part performance is important element in determining right to recover on theory of substantial performance.
    12. One contracting to sell, remove, and reconstruct oil well drilling rig may recover for substantial compliance with contract if defects in his work are such 'as can be corrected at slight expense.
    13. In action on contract to sell, remove, and reconstruct oil well drilling rig, instruction permitting recovery for substantial performance, though defects could not be remedied except by taking it down and reconstructing substantial portion of it, held erroneous.
    14. In action on contract to sell, remove, and reconstruct oil well drilling rig, where plaintiff relied on substantial performance only, instruction that slight deviations from contract were excusable held erroneous.
    Appeal from District Court, Natrona County; CyRus 0. BrowN, Judge.
    Action by the Lusk Lumber Company against the Independent Producers Consolidated and others. Judgment for plaintiff, and defendants appeal.
    
      
      A. C. Allen and O. N. Gibson, for appellants.
    Tbe action was for recovery under a contract for tbe sale, removal and reconstruction of a drilling rig; tbe defense was non-performance; tbe contract was one for manufacture and sale as distinguished from tbe erection of an improvement on real estate; 26 C. J. 675; Allerson v. Mining Co., (Ore.) 65 Pac. 978; Pomeroy v. Bell, (Cal.) 50 Pac. 683; Mining Co. v. Ramsay, 4 Alaska 734; G-assa-way v. Tbomas, (Wash.) 105 Pac. 168. There was an implied warranty that the rig would conform to requirements of a rig of that character; 4736, 4737 C. S.; 35 Cyc. 384. Tbe rule applies to tbe reconstruction of a second band machine for a special purpose; Lotbam v. Shipley, 85 la. 543; Co. v. Co., (Mo.) 140 S. W. 923; Kelly v. Co., (Mo.) 156 S. W. 62. An express warranty does not negative a warranty implied by law; 4737 C. S.; Ideal Heating Co. v. Cramer, (la.) 102 N. W. 840; Blackmore v. Fairbanks Co., (Ia.) 44 N. "W. 548. Discovery of breach before passing of title is ground for rescission; 4733 C. S.; 35 Cyc. 257; 23 R. C. L. 1418. A trivial defect in performance will not defeat recover; 13 C. J. 692; 23 R. C. L. 1418; Denton v. Atebinson, (Kan.) 8 Pac. 750. Tbe term, “Substantial Performance,” as applied to sales, differs from the term when applied to building contracts on tbe theory that tbe owner has received benefits; Vilas v. Co., (Vt.) 65 Atl. 104; 13 C. J. 690; Omaha Co. v. Omaha, 156 Fed. 922. An allegation of substantial performance, instead of due performance, fails to state a cause of action; 5681 C. S.; 31 Cyc. 58; 13 C. J. 727 and cases cited. To recover on a defective performance, an excuse must be alleged for failure of full performance; 13 C. J. 728, and cases cited. Tbe petition would be insufficient, even if it were a building contract; 13 C. J. 727; Brenton v. New-lin, 161 Ill. App. 168; Parker Co. v. Ayers, 43 Ind. App. 513. Tbe motion for continuance was improperly denied; 13 C. J. 123; Knauer v. Morrow, 23 Kan. 360. It was incompetent to show that tbe" rig, as constructed, was an average, standard rig in that locality; Camel v. Bussel, 139 Mass. 278; Streeter v. Sanitary District, 143 Fed. 476. The character of tbe builder was not in issue and evidence relating thereto was improper; 1 Wigmore, 286; Bank v. Bichmond, (Mo.) 139 S. W. 352; 22 C. J. 744. Approval by Myrin was a condition precedent to plaintiff’s recovery; 9 C. J. 867; Blome v. Inst., 150 Ill. App. 164; Herbert v. Dewey, (Mass.) 77 N. E. 822; O’Brien v. New York, (N. Y.) 35 N. E. 323. Where preponderence of evidence is against the verdict, it will be reversed on appeal; 4 C. J. 856; Fieldhouse v. Leisberg, 15 Wyo. 207; Bainsford v. Massengale, 5 Wyo. 1; Adams v. Smith, 11 Wyo. 200. A continuance should have been granted; Mowat v. Brown, 17 Fed. 178.
    
      James P. Kem, for respondent. •
    The case involved a building contract; 6 B. C. L. 967. The doctrine of substantial performance applies; Harrild v. School Dist., (Wash.) 192 Pac. 1. The petition is sufficient; 3 C. J. 778-781; Pierson v. County, (S. D.) 128 N. W. 616; Borden v. Berthenshaw, (Kan.) 74 Pac. 639. Performance is sufficiently pleaded; Finley v. Pew, (Wyo.) 205 Pac. 310; Piper v. Co., (Okla.) 85 Pac. 965; Parke Co. v. Bridge Co., (Calif.) 78 Pac. 1065. Motion for continuance was properly overruled; 13 C. J. 123; Kearney Works v. McPherson, (Wyo.) 38 Pac. 920; McFadden v. French, (Wyo.) 213 Pac. 760; Chapman v. Bank, (Wyo.) 181 Pac. 360; Keffer v. State, (Wyo.) 73 Pac. 556. No exception was taken to instructions given; Beagan v. Aiken, 138 U. S. 109; Syndicate Imp. Co. v. Bradley, (Wyo.) 43 Pac. 79. There was no error in the instructions; 23 A. L. B. 1435; testimony that the rig was an average standard rig, in the locality where built, was competent; 38 Cyc. 1432; Co. v. Harryman, (Colo.) 92 Pac. 922; Town v. Fairfield, (Colo.) 136 Pac. 470. Testimony as to reputation of the builder was competent; Henderson v. Coleman, (Wyo.) 115 Pac. 439; 1 Wigmore Evidence, 68; 3 Wigmore Evidence, 1984; Willman v. Jones, (Ala.) 27 So. 416; 13 C. J. 773. The evidence is sufficient to support the judgment; 31 Cye. 110; Bank v. Henry, (Wyo.) 136 Pac. 863; Cronberg Bros, v. Johnson, 29 Wyo. 11; Boatman v. Miles, 27 Wyo. 481.
    
      
      See Headnotes: (1) 31 Cyc. p. 58 n. 45. (2, 3) 13 CJ p. 727 n. 36, 39, 41 j 31 Cyc. p. 58 n. 45. (4) 13 CJ p. 727 n. 39. (5) 3 C'J p. 668 n. 45; 31 Cyc. p. 749 n. 34. (6, 7) 4 CJ p. 935 n. 61 New, 71 New. (8) 13 CJ p. 695 n. 84; p. 692 n. 89. (9, 10) 13 CJ p. 692 n. 93, 95 New. (11) 13 CJ p. 691 n. 85; 693 n. 2. (12) 13 CJ p. 692 n. 95 New. (13) 13 CJ p. 795 n. 33. (14) 13 CJ p. 795 n. 33.
    
   Kimball, Justice.

This is an action for the recovery of an amount claimed to be due under a contract for the sale, removal and reconstruction of a drilling rig intended to be used in drilling for oil. The defense whs non-performance of the contract. A jury trial resulted in a verdict and judgment for the plaintiff and the defendants appeal.

The defendants, Independent Producers Consolidated and Wyoming Star Oil Company, are corporations engaged in prospecting and developing oil and gas lands. Their managing officer, at the times herein mentioned, was H. A. W. Myrin. The contract was with the Independent Producers Consolidated, and the judgment was against that company. There are no points made on this appeal that require any further reference to the Wyoming Star Oil Company. The First State Bank, another defendant, was made a party because it was the paying agency, as will further appear on a recital of the facts. Hereinafter we shall refer to the Independent Producers Consolidated as the defendant.

In August, 1921, the defendant was looking for a second-hand drilling rig to be used in drilling a well 47 miles north of Mooreroft. The plaintiff, Lusk Lumber Company, had such a rig located near Osage. A Mr. Jackson, who did not testify in the case, inspected this rig for defendant, and thereupon, about September 1, 1921, he and plaintiff’s manager prepared a form of contract between the plaintiff and defendant. The material stipulations of the contract were that plaintiff agreed to sell to defendant the drilling rig, described as a “seventy-two ft., twenty ft. base standard rig;” that plaintiff agreed to move and rebuild the rig furnishing certain specified new parts and extra braces, and replacing materials damaged by tearing down and moving; that defendant would pay for the rig when so moved and rebuilt the sum of $4600; that a certified check for said amount be deposited by the defendant with the First State Bank, said check to be mailed to the plaintiff when “contract is completed and passed on” by the defendant.

The writing embodying this contract was sent to Mr. Myrin for his approval and the defendant’s signature. The defendant signed upon condition that the rig be completed by October 1; that the “wooden crown blocks can be used for drilling to minimum 2500 feet,” and that the certified check for $4600 would be mailed to plaintiff at the date “when contract is completed and passed on by myself (Myrin).” It is admitted that plaintiff agreed to these changes or amendments of the writing. The bank notified the plaintiff that Myrin had deposited with it $4600 to pay to plaintiff according to the terms of the contract. The plaintiff then proceeded to tear down, move and rebuild the rig. On September 22, plaintiff notified Myrin that the rig would be completed and ready for inspection September 25. Myrin replied that he could not make an inspection until the 29th. The inspection was made on the 29th. Mr. Myrin came from Riverton for that purpose accompanied by his attorney and Mr. Hall, a rig builder. Mr. Hall, in the presence of Mr. Myrin and plaintiff’s manager, examined the rig, and on September 30 made out a formal, written report in which he set forth 18 specific defects in the rig, stated that there were other minor defects too numerous to mention, and advised against any attempt to repair the structure. This report was sent to the plaintiff with a letter from Mr. Myrin stating that in the face of the report he was unable to accept the rig.

On October 6, plaintiff wrote to Mr. Hall stating in substance that it wished to make the rig satsifactory, but that some of Mr. Hall’s objections related to matters not covered by the contract. Mr. Hall was asked to make out for plaintiff a list of materials that would be necessary to put tbe rig in “A 1 shape,” and to state what he would charge to work with plaintiff’s workmen while the rig was being made over so plaintiff would know that when completed it would be right. This, letter to Mr. Hall was answered October 13 by Mr. Myrin who stated that he was sorry to repeat that he was unable to accept the rig, and that any additional work would be of no benefit to defendant and would not comply with the contract. He gave as his reasons Mr. Hall’s report of September 30, in which he advised against an attempt to repair; that Mr. Hall stated that if the rig should be completely rebuilt it would be a patched-up job, and dangerous to workmen; that the rig had not been completed within the time stip-. ulated by the contract, and that it could not be put in shape for drilling by October 25, the time when defendant was obligated to commence drilling.

To this last letter the plaintiff, on October 18, replied by telegram as follows:

“Rig erected per contract and within time fixed. Entitled to and demand payment. Consider objections of Mr. Hall for most part trivial and concerning matters not covered by contract but to be more than fair are willing to meet every substantial objection and have work required for that purpose done by October twenty-fifth. In making this offer we do not admit non-compliance with contract nor that anything further is required. Wire answer. ’ ’

This telegram was not answered. There were no further communications between the parties, and the plaintiff soon commenced this action.

The defendant claims that the petition is defective in failing to allege performance of the contract, and that the court erred in overruling a demurrer. The allegations of the petition that have reference to performance of the contract are these:

“That the plaintiff immediately upon the execution of the contract aforesaid set about in good faith to fully perform said agreement; caused the rig mentioned in the contract above set out to be taken down at its former location twelve miles southwest of the town of Upton, 'Weston County, Wyoming, and the materials therein contained, together with the new materials required to complete the work, to be transported to the defendants’ location as aforesaid, and caused said rig to be rebuilt at said location ; that the plaintiff has substantially performed all the conditions on its part to be performed, and on the 22nd day of September, A. D. 1921 notified the defendant Independent Producers Consolidated and H. A. W. Myrin that the moving and re-building of said rig had been completed and that the same was ready for inspection by the defendant; that some days later, to-wit, on the 29th day of September, 1921, the defendant inspected said rig and by a letter dated October 1, 1921, made certain objections thereto of a trivial character and concerning matters not covered by the contract; that thereupon the plaintiff without admitting non-compliance with the contract or that anything further was required, offered to meet every substantial objection made by the defendant, which said offer was declined by the defendant; that said defects may be remedied and said omissions supplied at a cost not to exceed Four Hundred Fifty Dollars ($450.00) which said sum the plaintiff deducts from the balance due on said agreement as aforesaid.”

The prayer was for “the sum of $4600 less the sum of $450 required to fully complete the work aforesaid, or a net sum of $4150,” with interest, etc.

It is agreed that this is a suit on the contract and not on a quantum meruit or a quantum valebant. The petition should allege performance, or a sufficient excuse for nonperformance, of conditions precedent. In alleging performance, the code permits a general allegation that the party “duly performed all the conditions on his part.” Wyo. C. S. 1920, Sec. 5681. If a party does not avail himself of this provision of the code, he should allege specifically the facts to show a performance of the conditions. Korbly v. Loomis, 172 Ind. 352; 88 N. E. 698, 139 Am. St. Rep. 379, 19 Ann. Cas. 904; Witt v. Old Line etc. Ins. Co., 89 Neb. 163, 131 N. W. 189; 13 C. J. 727. In New York, if a party seeks to plead performance by a general allegation, the decisions require a strict following of the statutory language, and an omission of the word “duly” seems fatal. Hedges v. Pioneer Iron Works, 166 App. Div. 208, 151 N. Y. S. 495. Other courts are more liberal. Ivanhoff v. Teale, 47 Mont. 115, 130 P. 972.

The plaintiff in the case at bar does not avail itself of the statute. The general allegation of the petition is that plaintiff “substantially” performed. It is evident from other allegations that the word “substantially,” was not intended as an equivalent of ‘ ‘ duly, ’ ’ and that the pleader did not intend to rely upon full or strict performance. The petition admits that there were defects to be remedied and omissions to be supplied. The plaintiff seeks to bring itself within the rule permitting a recovery in a suit on a contract that has been substantially performed by deducting from the contract price the amount necessary to remedy defects and supply omissions. It is usual in such cases for the pleader to allege performance, and the allegation of performance will permit of a recovery on proof of substantial performance with deductions sufficient to compensate the defendant for defects and omissions. Finley v. Pew, 28 Wyo. 342, 361, 205 p. 310, 206 Pac. 148, and cases there cited; Spence v. Ham, 163 N. Y. 220, 57 N. E. 412, 51 L. R. A. 238. The foregoing rule of pleading is very favorable to the contractor. Its theoretical justification is that substantial performance is performance. Rowe v. Gerry, 112 App. Div. 358, 98 N. Y. S. 380. A practical reason for the rule is that the defects and omissions may be unknown to the contractor. If the contractor does not eare to avail himself of this liberal rule of pleading, but undertakes to allege substantial performance, he should state the facts. When he alleges that he has substantially performed he states a conclusion, the-meaning of which depends on the pleader’s view as to-what constitutes substantial performance. The petition, in the case at bar, in addition to the general allegation of substantial performance, alleges facts that show a performance of some conditions, but not all. Besides, we have the allegation that defects may be remedied and omissions supplied at a cost not to exceed $450 — -nearly one-tenth of the contract price — without any statement of what those defects and omissions are. The petition neither alleges performance by the general allegation authorized by the statute, nor by a statement of sufficient facts to show a substantial performance. The demurrer-should have been sustained.

The plaintiff argues that the defendant waived its right to object to an adverse ruling on the demurrer by subsequently answering and proceeding to trial. The petition, without a sufficient allegation of performance, failed to-síate a cause of action, and that objection was not waived. Wyo. C. S. 1920, Sec. 5653; 3 C. J. 668.

Error in overruling a demurrer to a petition may in-some circumstances be harmless. The answer or reply may supply allegations omitted from the petition. Insurance Co. v. McGookey, 33 O. St. 555, 562. In the case at bar the most that is claimed for the petition is that it sufficiently alleges a substantial compliance with the contract. The plaintiff did not claim the right to recover the-full contract price, but deducted an amount alleged to be sufficient to cover the expense of completing the structure. It is true that the petition states that the defects were ‘ ‘ of' a trivial character and concerning matters not covered by-the contract,” but this was a conclusion of the pleader.. In considering whether the overruling of the demurrer-was harmless, we think we must take the petition as alleg- • ing in effect that the plaintiff did not perform the contract by completing the rig, bnt that it offered to do so, and on its offer being rejected, claims to be entitled to recover the contract price less the amount (about $450) required to complete the work. But this theory was not followed at the trial. The plaintiff recovered the full contract price less one dollar only. The plaintiff’s case as made at the trial consists almost entirely of evidence tending to prove that the defects which it had offered to correct, and for which it gave the defendant credit in its petition, did not in fact exist. In view of these circumstances, and because of certain instructions presently to be noticed which we believe authorized a verdict on a theory not applicable to the facts, we cannot say that the error in overruling of the demurrer was harmless, or that it was cured by anything that occurred at the trial. It might be that the petition would be held sufficient to support a judgment for the plaintiff for the amount claimed in the petition on the theory that defendant wrongfully put an end to the contract by rejecting plaintiff’s offer to complete the rig, but, as that theory was not submitted to the jury, we need not decide whether the petition and the evidence would have supported such a judgment.

It seems to be conceded that the contract provision that payment should be made when the rig was completed and “passed on” by Myrin, meant that Myrin should approve the work, or that the work should be completed to his satisfaction, before anything became due. This seems to have been the theory of the plaintiff in drawing the petition in which it is alleged that Myrin wrongfully and unreasonably withheld his approval, and much of the evidence introduced by plaintiff was seemingly offered for the purpose of proving this allegation. The defendant claims that the evidence was insufficient to support a finding that Myrin’s approval was wrongfully or unreasonably withheld. ¥e think the finding was justified, if the jury believed the plaintiff’s evidence. But probably no finding on that point was necessary, as the stated provision o£ the contract was not mentioned in any instruction given or requested, and no argued assignment of error is based on this omission.

There was a sharp conflict in the evidence on the issue of non-performance. Much of the testimony was given by ■expert rig-builders, and the questions and answers were often illustrated by reference to a miniature drilling rig. Some of this testimony is not easy to understand from a reading of the transcript. It is not necessary to undertake any detailed recital of the evidence on this issue. It will be sufficient to say that the plaintiff’s evidence tended to prove that the rig was completed in compliance with the contract with a few trivial omissions that could have been supplied at an expense of about $10. The defendant’s evidence tended to prove that the rig was not erected in a workmanlike manner, and not fit or safe for use for the purpose for which it was intended.

The defendant argues that the doctrine of substantial performance has no application to the contract in question, because it is not a “building” contract, and authorities are cited for the purpose of showing that a drilling rig is not a building or fixture. We do not decide whether the drilling rig became a fixture, or whether the contract was what is commonly called a ‘ ‘ building contract. ’ ’ The doctrine of substantial performance is most frequently applied to building contracts, and it is there, perhaps, that the reasons for its application are clearest,' but it is not confined to those cases. Page on Cont. (2d ed.) See. 2778. The reasons underlying the doctrine make it applicable to all cases where it would be unjust to the plaintiff to declare a forfeiture of his work and materials. Williston on Cont. Sec. 805. In order for the plaintiff to claim compensation for a substantial performance, it must appear that he has tried in good faith to perform. His default must not be wilful. Tbe defendant’s right in all cases to have the contract performed is still maintained, at least in theory. When the doctrine of substantial performance is applied, the defendant must receive a fair compensation by deduction from the amount that would have been due for full performance. If the defects are so serious as to deprive the property of its value for the intended use, or if they so pervade the whole work that a deduction in damages will not be fair compensation, the plaintiff cannot rely on substantial performance. Williston, supra, Sec. 805.

In determining whether a forfeiture of plaintiff’s work and materials would be unjust, the benefit or lack of benefit to defendant from a part performance is an important element. Williston, supra, Sec. 843. In cases involving contracts for the construction of improvements on lands, the element of benefit to the defendant, the owner of the land, is usually present, and it would often be clearly unfair to permit the defendant, without paying anything, to use and enjoy a structure which is substantially like that for which he contracted. The same principles applicable to building contracts must be applicable to other contracts where there is substantial performance of which the benefit enures to the defendant. Williston, supra, Sec. 842. Whether those principles can be extended to contracts for the manufacture of chattels which have not been accepted by the defendant, seems a doubtful question. Harrild v. School District, 112 Wash. 266, 192 Pac. 1, 19 A. L. R. 811, and note; Page op. Contracts, Sec. 2788. We do not now consider eases where something slightly less than strict performance has been held to be equivalent to frill performance. Turner v. Osgood etc. Co., 223 Ill. 629, 637, 79 N. E. 306. See: Pacific-Wyoming Oil Co. v. Carter Oil Co., 31 Wyo. 314, 330, 226 P. 193.

The drilling rig, though it may not have been a building or a fixture, was as unwieldly as many buildings, and could not practically be retained by plaintiff when defendant refused to pay for it. If it was constructed in substantial compliance with tbe contract, according to tbe principles above stated, and tbe defects could have been corrected at slight expense, we think it would be unfair to bold that tbe plaintiff was not entitled to recover for bis work and materials. It must be kept in mind, however, that tbe structure in question was intended for one purpose only — to drill a well — and if, because of defects for which plaintiff! was responsible, tbe structure bad no value for that purpose, tbe plaintiff’s claim bad no equity. This brings us to a consideration of instruction No. 7, as follows:

‘ ‘ The Court Instructs tbe Jury that, if you find that tbe plaintiff is entitled to recover and if you further find that the defects, if any, complained of by the defendants, are remediable without taking down and reconstructing any substantial portion of tbe rig, tbe amount of deduction from the contract price to which tbe owner is entitled, is tbe expense of making tbe work conform to contract requirements. If, on tbe other hand, you find that tbe plaintiff is entitled to recover and you further find that the defects, if any, may be remedied only by taking down and doing over some substantial portion of tbe work involving such expenditure that tbe contractor would be deprived of adequate compensation, tbe amount to be allowed to tbe defendants is tbe amount which tbe rig is worth less, by reason of tbe defect, than it would have been if constructed in entire conformity to tbe contract. ’ ’

Tbe instruction should not have been given. It had no application to tbe facts in tbe ease. If tbe plaintiff was entitled to recover on tbe contract tbe only proper measure of damages was tbe contract price less tbe expense of making tbe work conform to tbe contract requirements. A statement of this measure of damages is to be found in tbe first sentence of the instruction, but throughout the instruction the jury is given plainly to understand that the plaintiff may recover though defects in the rig cannot be remedied except by taking down and reconstructing a substantial portion of it. The principle expressed in the instruction is applicable to some cases involving building contracts. Jacob v. Kent, 230 N. Y. 239, 129 N. E. 889, and cases cited in note thereto, 23 A. L. R. 1438. Thus, where the plumbing is not of the kind specified; the ceilings too low; thé windows misplaced, or even where the building itself is set on the wrong spot, the value of the structure for the intended use may be so slightly impaired by the defect that the contract may be considered substantially performed, though the defect cannot be remedied except by tearing down and reconstructing. To such cases the measure of damages stated in the last sentence of the instruction is applicable. But the drilling rig in the case at bar was not useful for any purpose except the drilling of a well. Any defects that could be remedied only by taking down and doing over some substantial portion of the work, would deprive the structure of all value for the purpose for which it was intended, and if the plaintiff was responsible for defects of that character, the contract could not be considered substantially performed.

No well has been drilled at the place where the rig was set, and the evidence shows that the plan to drill has been abandoned. The rig in question has not been used and there is no reason to suppose that it will ever be used for any purpose. It may, perhaps, be inferred, as plaintiff contends, that the plan to drill had been abandoned before September 29, when the rig was inspected by Myrin and Hall, and, therefore, that defendant had a motive for refusing to accept the rig even though it was not defective. It is not contended, however, that the fact that defendant had decided not to drill changed in any way the rights and duties of the parties with respect to performance of the contract. But the jury had before it evidence to show that the rig, even if perfect, would not have been used by defendant, and that, as a practical matter, a defective rig was worth to defendant just as much as a perfect one. In these circumstances, the instruction was particularly dangerous.

Instruction No. 5 was as follows:

“You are instructed that it is the law that, where one contract for the erection of a certain structure, he is entitled to have it erected in conformity with the provisions of his contract; but in the application of this rule the law requires only a substantial compliance therewith. By the use of this term ‘4 substantial compliance ’ ’ you are to understand that it does not require absolute compliance. Slight variations or deviations from the contract as axe inadvertent or unintentional and not due to bad faith and which do not impair the structure as a whole, are excusable, and as applied to this case, if the defects complained of by the defendants are only slight and do not impair the structure as a whole and the plaintiff acted in good faith in relation thereto, then defendants cannot complain of said defects. ’ ’

This instruction probably states a correct principle for consideration in determining whether or not there was substantial performance. But it is not limited to that question. Even slight variations or deviations from the contract which do not impair the structure as a whole, may give the defendant the right to a reduction in damages, and the jury should not be told in such a general way that they are excusable, and defendant cannot complain of them.

On a view of the whole record we are sure that we would not be justified in holding that the error in overruling the demurrer to the petition was harmless. On this point we have considered the instructions, although the plaintiff is probably right in its contention that the trial judge’s nunc pro tunc order, the only thing to show exceptions to instructions, is not incorporated in the record. Further, our discussion of what seem to us material defects in the instructions will be of some benefit on a new trial.

Since the trial the assets of the First State Bank have passed into the hands of a receiver. The attorney for the receiver has filed a brief in.which he makes several contentions that do not seem to have been made in the trial court.- We deem it unnecessary to consider them. When the petition is amended, the receiver no doubt will have an opportunity to appear and make any defense he may have.

The judgment will be reversed, and the case remanded for a new trial with instructions to sustain the demurrer to the petition with leave to amend.

jReversed and Remanded with Instructions.

Potter, Ch. J., and BluME, J., concur.  