FRICK, I.
On the 20th day of June, 1905, appellant and respondent entered into a contract by the terms of which appellant agreed to construct and complete a certain dam in Box Elder county, Utah, for the respondent. The contract, among other provisions, contained the following:
“The party of the second part [appellant] hereby undertakes and agrees to furnish the necessary labor and materials, including tools, implements and appliances, required, and to build and complete in a workmanlike manner an earthen dam and concrete tunnel across the creek mentioned above for the party of the first part [respondent], in the manner and under the condition and according to the specifications hereinafter set forth, and the plans for said work prepared by the engineer of the party of the first part.”
The contract specially provided when the work was to be commenced and when completed; the dimensions of the dam and the manner of its construction, together with the kind and quality of the materials to be used. In short the contract in terms provided what the contractor should do> and how the work should be done in constructing the dam. The contract also provided that payments to the contractor “are to be made on the 20th day of each month upon the report of the superintendent for the party of the first part.” In this way seventy-five per cent, of the work done and material furnished by the contractor was to be paid monthly, *386and the remaining twenty-five per cent, of the contract price was to be paid sixty days after the “final completion of the entire work.” “All work to be inspected by the superintendent of the party of the first part, and no payments to be made except with his approval.” The contract also contained a special clause upon which appellant lays much stress, and for that reason we shall set it forth in full. It is as follows:
“To prevent disputes and litigation it is further agreed by and between the parties of this contract that E. J. Showell shall be referee in, all cases that may arise under this contract. In case the superintendent for the party of the first part shall question the work being done, either in workmanship or material, the contractor shall stop said work until the question has been settled by said referee and the decision of said referee shall be binding on the contractor.”
Appellant, in substance, alleged in his complaint that he had completed the dam in accordance with the terms of the contract, and that the same had been inspected by respondent’s superintendent, and accepted; that appellant had done certain extra work, and had furnished certain material not included in the original contract, and for which respondent was liable under the terms of the contract, amounting in round numbers to $704, and that there was due the appellant the sum of $1095.83 as the twenty-five per cent, remaining unpaid on the contract, the whole amount aggregating the sum of $1799.83, for which appellant demanded judgment. Respondent in its answer admitted the making of the contract, but denied that appellant had constructed the dam in accordance with its terms, or in accordance with the plans and specifications; denied that the dam had been completed and accepted, and also set forth several affirmative defenses and counterclaims which need not be specially mentioned. The case was tried to a jury, and the court withdrew from their consideration appellant’s claim for extra labor and material upon the ground that all the material claimed by appellant was in fact required to be furnished by him under the terms of the contract and as a part of it. The court also withdrew from the consideration of the jury respondent’s special counterclaims for damages, and submitted the case *387to tbe jury upon tbe other issues presented by tbe pleadings. Tbe jury found tbe issues in favor of respondent, and returned a verdict against tbe appellant of “no cause of action.” Tbe court entered judgment upon tbe verdict, tbe effect of wbicb was a dismissal of tbe complaint, and for costs, against appellant.
Appellant contends that tbe court erred in its rulings by excluding bis claim for extra labor and material. We are of tbe opinion that tbe labor and material claimed by appellant as extra were not sucb, but that both tbe labor and material claimed as extra clearly came witbin tbe terms of tbe contract as labor and material to be provided by appellant as part of tbe contract and upon tbe terms and conditions therein specified. Appellant’s contention in this regard, therefore, cannot be sustained.
Appellant further asserts that tbe court erred in refusing appellant’s request to instruct tbe jury to return a verdict in favor of appellant, for tbe sum of $1095.83, tbe amount representing tbe twenty-five per cent claimed to be due him under tbe contract. This claim is based upon tbe provision of tbe contract as construed by appellant, and especially that clause of tbe contract wbicb provided for a referee in case of disputes. As we construe this clause, it was what is usually termed by tbe courts a “precautionary stipulation,” inserted in tbe contract for tbe benefit of tbe contractee. It is not a stipulation whereby tbe 1 whole matter as to whether tbe labor and material were of tbe kind and quality named in tbe contract, and whether tbe work required to be done was to tbe satisfa.etion of a certain person agreed upon by tbe parties. Under sucb stipulations tbe courts have frequently held that if the material is accepted by, and tbe work is done to tbe satisfaction of, tbe person named, then tbe contractee, in tbe absence of fraud, is estopped from subsequently disputing tbe fact that tbe work was completed and accepted in accordance with tbe stipulations of tbe contract. Moore v. Kerr, 65 Cal. 519, 4 Pac. 542, cited by appellant, is a case in wbicb tbe rale just referred to is illustrated and applied. In that *388case tbe contract contained a stipulation that tbe bridge agreed to be constructed was “to, be built under tbe direction and to tbe satisfaction of tbe superintendent appointed by said board [tbe contráete©] in good and workmanlike manner.” Tbe trial court found that the bridge bad been built and completed to' tbe satisfaction of tbe superintendent, and that be bad accepted tbe same. Tbe Supreme Court of California accordingly beld that, in tbe absence of any allegation or proof of collusion and fraud between tbe superintendent and tbe contractor, tbe contractor, upon tbe findings made by tbe court, was, as a matter of law, entitled to judgment for tbe unpaid balance of tbe contract price. In tbe case of Wright v. Meyer, 25 S. W. 1125, tbe Court of Civil Appeals of Texas states tbe rule in tbe following language:
“The rule is that when the architect is, by the terms on, the contract, made the sole arbiter between the parties of matters concerning material and character of work: used in construction, the exercise of his judgment on such matters will be binding on the parties, unless some species of fraudulent conduct in respect thereto is pleaded and proved.”
Tbe referee clause of tbe contract in question is, however, not like tbe one passed on by tbe Supreme-Court of California nor like tbe one referred to by tbe Texas Court of Civil Appeals. This is clearly pointed out by tbe last-named court in tbe Wright Case. It is there in effect beld that tbe rule does not apply if the contract in terms provides tbe bind and quality of tbe material, and bow tbe work 2 shall be done. In such event all tbe provisions of tbe contract must be construed and applied together, and each provision must, if possible, be given effect. It is true that in tbe referee clause contained in tbe contract in question a certain person is named as referee, to whom shall be referred any question as to whether tbe work or material is in accordance with tbe contract, and that when tbe matter is so referred, tbe decision of tbe referee shall be bind» ing on the contractor. If in this case any matter mentioned in tbe contract bad been referred to tbe referee, aud be bad *389exercised bis judgment upon it and rendered a decision, we would tben be required to determine tbe effect of sucb a decision. In this case, however, the parties all agree that nothing was ever submitted to the referee, although the parties, as appears from the evidence, did not always agree. For instance, the evidence discloses that the contractor was not satisfied with the estimates made by the person whom the contractor insists was respondent’s superintendent, but he, nevertheless, did not appeal to the referee, but submitted the matter to the engineer who prepared the contract. On the other hand, the officers of the respondent contended that the dam was not completed according to the contract, and ret-fused to pay therefor, but neither they nor appellant at any time asked that anything be referred to the referee. Again, the appellant, who now strenuously insists that, inasmuch as respondent has failed to call in the referee to adjust any difficulties, we must assume that there were none to adjust, himself waived this provision, and at no time appealed to the referee or asked him to pass upon any question, although it is made clear that respondent disputed appellant’s claims that he had completed the dam, and that he was entitled to his pay. If anything fell within the referee clause, we think it was the question of whether the dam was completed in accordance with the terms of the contract. It is thus apparent that neither party paid any attention to the referee clause, but treated the matter as if no such clause existed. It seems to us that under the undisputed 3 evidence no other legal inference is permissible than that both parties waived the so-called referee clause a<s if by mutual consent. If, therefore, the clause was ignored at a time when it might have been of some use to the parties, it would be an injustice, if not a fraud, to now enforce it as against one and in favor of the other. Courts should not enforce what the parties themselves have by mutual consent waived.
But, assuming that we are wrong in this conclusion, and that the referee clause is to receive the full effect that is usually given to such clauses by the courts in building *390and construction contracts, wbat then should the result be? As before stated, such clauses are construed to be for the benefit of the contractee, and if the contract specifies the manner of doing the work, and also provides that upon its completion a certain person named may accept the work, such person may, nevertheless, not bind the contractee by an acceptance of work which is not done and completed in accordance with the terms of the contract. Neither can such a person place an erroneous, or what is sometimes 4 termed an “illegal,” construction upon the contract, and binds the parties, or either of them, by such construction. Nor is the fact that the person who it is contended represented the respondent in this case while the work of constructing the dam was in progress, made no objections, nor submitted any matters to the referee conclusive as against the respondent. No doubt the fact that no objections were made while the work was being done was important, but it was at most only evidence more or less strong that the 5 work and material were in accordance with the provisions of the contract. This would also be so if the work had been accepted by the superintendent of respondent as claimed by appellant, since the contract nowhere provides that the superintendent should be the sole juge of whether the terms of the contract had been 6 complied with, or that his acceptance of the dam should be conclusive upon that point, but the contract in different clauses^ provides that the work shall be done in accordance with the specifications stated in the contract, and under the supervision of the superintendent of respondent.
The case of United States v. Walsh, 115 Fed. 697, 52 C. C. A. 419, seems to be much in point. In that case a similar clause contained in a construction contract was construed and applied by the United States Circuit Court of Appeals. It is there held that such a clause is to be construed in connection with all the provisions of the contract, and is ordinarily to be regarded as merely precautionary, and for the benefit of the contractee. In that case, like in *391this, it was contended that the work had been accepted, and further, that no objection either to the work or the material had been made while the work was in progress; and hence it was contended that the plaintiff in that case, for whom the work was done, could not be heard to say that the work was not done according to the contract. Upon this point the court said: “The acceptance by the engineer, or his acquiescence as the work proceeded, and the final acceptance by the board of officers designated by the navy department, were important evidential facts tending to establish that the work and materials were supplied conformably to the contract. In other respects they were not of controlling effect.” The court also emphasized the doctrine that where the contract specifies how the work shall be done, the person authorized to accept the work cannot bind the contractee by accepting the. work which is not done in accordance with the specifications. This is but common sense. The parties made the contract as a guide for each other’s conduct, and when the terms of the contract has substantially been complied with, and not until then has the contract been performed, and certainly no one, unless expressly authorized by the parties, can vary the terms of the contract. The doctrine is illustrated and applied in the following, among other, cases: Town of Sterling v. Hurd (Colo.), 98 Pac. 174; Cannon v. Hunt, 113 Ga. 501, 38 S. E. 983; Glacius v. Black, 50 N. Y. 145, 10 Am. Rep. 449; Fitzgerald v. Moran, 141 N. Y. 419, 36 N. E. 508.
In an action upon the contract appellant cannot recover unless and until he shows that he has, substantially at least, complied with its provisions. Appellant alleged that he had so complied and respondent denied these allegations, 7 and much evidence was directed to the issue thus presented. The claim that appellant makes, how.ever, is that respondent was precluded from asserting that the work had not been done according to the terms of the contract, for the reasons (1) that respondent made no objections as the work proceeded; and (2) that the dam was accepted by the respondent’s superintendent after it was *392completed. In answer to the first proposition we have already pointed out why it is not tenable; and, as to the second, this was particularly a question of fact for the jury, which they found against appellant’s contention. While the contract speaks of a superintendent, no one was designated as such in the contract itself. Some time after-wards, however, a Mr. Hurd was appointed by resolutions adopted by the board of directors of respondent. The resolutions do not, of themselves, make it clear whether he was appointed as superintendent generally, or whether he was appointed for the purpose of overseeing a particular part of the work only. We are of the opinion that a fair construction of the resolutions, when considered in connection with the subsequent conduct of the parties, makes it fairly clear that it was not contemplated by the parties that Mr. Hurd was in fact appointed as the general superintendent. Appellant did not so regard him, for the reason that whenever there was any difference between Mr. Hurd and appellant, appellant always submitted the matter to Mr. Anderson, whom appellant recognized as representing the respondent, and who had prepared the plans and specifications for the construction of the dam. It will thus be seen that both appellant and respondent assumed, and acted upon the assumption, that Mr. Anderson, and not Mr. Hurd, was the person who was to pass final judgment upon whether the dam was completed according to the terms of the contract or not. The jury having in effect so found, it is not of much importance whether this was declared to be so as a matter of law by the court or by the jury as a question of fact. And further, since under the law respondent was not estopped from proving that the dam was 8 not constructed and completed in accordance with the terms of the contract, and since the question of whether the dam was accepted or not was one of fact, which was determined against appellant’s contention, we cannot see wherein he was prejudiced by any ruling made by the trial court. Under the contract appellant was to be paid specific amounts for material when reduced to square or cubic feet or other*393wise, and for work done when reduced to cubic feet or yards, or when expressed in some other form. In this way it was an easy matter to determine just what appellant was entitled to for material furnished and for work done on the dam. The jury allowed him the contract price for all material furnished, and for all work done by him. In view that the jury have found that the dam was not completed in accordance with the terms of the contract, and the finding being supported by the evidence, we think the appellant was allowed all that he was entitled to. The appellant, however, complains that the court, in submitting the case to the jury, erred in giving certain instructions and in refusing to instruct as requested by' appellant. The difficulty with the claim that the court erred in giving certain instructions is that the exceptions are either to instructions as a whole, or, where this is not the case, the exceptions 9, 10 are aimed 'at excerpts only. Where the exceptions are to the whole instruction, the exceptions cannot be considered, because the whole instruction is not bad; and where the exceptions are to excerpts merely, the exceptions are unavailing, for the reason that if the instructions are considered as a whole, as they must be, the court committed no error in using the particular language or expressions complained of. The other errors complained of are not of sufficient importance to merit special consideration.
While the record is not free from technical errors, yet we are well satisfied that in view of all the evidence appellant suffered no invasion of a substantial right, and hence we are not authorized to reverse the judgment. The judgment therefore is affirmed, with costs to respondent.
STEAUP, C. J., and McCAETY, J., concur.