
    F. A. Littell, Receiver, Appellant, v. Webster County, Iowa, The Board of Supervisors of said County et al., Appellees.
    Contracts: substantial performance. To recover upon contract i the plaintiff must show substantial compliance therewith; and the rule obtains although such compliance was an impossibility.
    
      Same. Substantial performance of a construction contract permits 2 only such omissions or deviations as are inadvertent or unintentional and do not impair the structure as a whole, and may be remedied without tearing down and rebuilding other parts of the structure, or may be compensated without serious injustice by deduction from the contract price.
    Drainage: contracts: construction: approval and payment of 3 work. The board of supervisors has no power to pass upon the estimates made by the engineer in charge of drainage work, for the purpose - of enabling the contractor to receive partial payments; this can only be done after the work has been completed and the engineer has made his final report approving the entire project: So that a contract by which the county is to finally accept and settle for sections of an improvement as they are completed, without reference to the final completion of the whole project, is without authority in law.
    Same: Ultra vires provisions: effect. The parties to a drainage 4 construction contract may agree as to who shall stand the loss or damage to the work arising from unforeseen or unavoidable causes; and an agreement by the supervisors that the contractor shall not be liable for damage to completed work is not ultra vires. But even if such provisions were to be regarded as invalid it would not invalidate the entire agreement, where work had been done of manifest benefit to the land drained. The most that the county authorities could insist upon is to have the provisions disregarded.
    Same: authority of engineer. An agreement in a drainage con-5 tract that the decision of the engineer as to the construction of the contract and the specifications shall be. final, does not authorize him to pass upon the character of the work and completion of the improvement; and his disapproval of the work on the ground that it is not in conformity with the contract will not defeat the contractor’s right of recovery.
    Same: compliance with contract: acceptance of work: evidence. 6 While drainage work must be completed to the satisfaction of the engineer, still he can not deprive the contractor of his right to compensation through fraud, collusion or failure to act; and any capricious or arbitrary action on his part is sufficient to justify a finding of fraud. In this action the contract provided that the contractor should keep each mile of the ditch in good condition and repair until finally accepted; that each mile should be accepted when completed; that he should not be liable for damage to completed work on account of heavy rains; and that when accepted the ditches should have full dimensions of cross-section and berm as ordered by the engineer, and the sides free from overhanging sods and dirt. Estimates were not made on the mileage basis, nor was the work accepted mile by mile. When tendered for acceptance the main ditch and most of the laterals were not at grade or of the required depth. Held, that the provision for acceptance of the work mile by mile as completed was waived, and when tendered for acceptance as a whole the work was not in substantial compliance with the contract, justifying an adverse report by the engineer and refusal of acceptance by the supervisors.
    Mandamus: when not available. Mandamus will not lie to cotp7 pel the engineer and supervisors to accept and pay for drainage work unless fraud or want of good faith on their part is shown; mere error in judgment will not support the action. Nor will it lie to enforce contractual rights, as the purpose of the remedy is to enforce the exercise of a legal duty.
    Same: Quantum meruit. In an action by mandamus to compel pay-8 ment for work performed under contract, as having been done in substantial compliance with the contract, recovery for the value of the work can not be had; but on rehearing this case is remanded to permit plaintiff to try the question of whether he is entitled to any relief, with the right to amend for that purpose.
    
      Appeal from Webster District Court. — Hon. Chas. E. Albrook, Judge.'
    Friday, June 9, 1911.
    Action of mandamus to compel defendant Reynolds to issue proper and legal certificates as to tbe completion of a drainage ditch for what was known as Drainage District No. 4 in Webster County; to compel defendant Hanrahan, as county auditor, to issue a' warrant for the payment of the balance due on ,the contract for excavating the ditch; to compel defendant Hadley, as county treasurer, to pay the said warrant from the proper fund; and to compel the board of supervisors of Webster County to accept the report of the engineer Reynolds, and to order the payment of the warrants; and further equitable relief was also asked conformable to the allegations of the petition. The Tecumseh National Bank of Tecumseh, Neb., intervened in the suit claiming a part of the funds in virtue of an assignment from Ward Bros., the original contractors for the ditch. Plaintiff averred that the ditch was dug according to the contract and specifications therefor, and finally completed some time before the bringing of this action. Defendants, in separate answers, denied the material averments of the petition, denied that the ditch was dug according to the terms of the contract, or that it was ever finally completed. They alleged that the work was not done according to the specifications or the contract, and further pleaded that the work was negligently and unskillfully done. Bpon these issues the case was tried to the court, resulting in a judgment dismissing both the petition and the petition of intervention, and plaintiff and intervener ‘both appeal.
    
    Affirmed.
    
      J. M. Graham, W. 0. Elliott, and Healy & Ilealy, for appellant.
    
      Samuel Davidson, for intervener.
    
      Kelleher, & O’Connor, M. J. Mitchell, and F. A. Grosenbaugh, for appellees.
   Deemer, J.

The board of supervisors of Webster County having established and ordered the construction of a drainage district in said county known as District No. 4, on August 4, 1905, sent out notices to contractors for bids for the construction of the main ditch, drains, and laterals. Various bids were received pursuant to this notice which were opened on September 5, 1905, and the contract was awarded to Ward Bros, of Audubon County, Iowa, the contract itself being signed on September 14, 1905. Ward Bros, undertook to complete the work under the contract, but some time before this action was commenced they became 'embarrassed financially, and on October 20, 1908, plaintiff herein was appointed receiver for them and as such brought this action. In order to avoid confusion we shall, during the course of the opinion, speak of the plaintiff as Ward Bros, unless a contrary thought is desired to be expressed; and when essential to differentiate the receiver from Ward Bros, we shall so indicate. Immediately upon the execution of. the contract plaintiff commenced to construct dredge boats, and to procure their tools and equipment, and proceeded to excavate and dig the ditch and constantly proceeded with it save as delays were caused by unfavorable weather until the fall of the year 1908, when they claim to have completed the job.

In accordance with the terms of the contract the board of supervisors appointed a civil engineer to supervise the construction of the ditch and to issue to the contractors monthly estimates and certificates of the amount of work completed. These estimates and certificates were filed with the county auditor who issued warrants to the contractor upon the county treasurer for eighty percent of the contract price for the work thus completed and certified to-. It was the duty of said engineer to see that the work was properly done according to the’ plans and specifications which were made a part of the contract, and to require the workmen to correct any defects or mistakes in the construction of the ditch. The first engineer appointed to supervise the construction of Ditch No. 4 was Mr. C. A. Snook, the engineer who had planned and surveyed this drainage district. Mr. Snook remained in charge until the first 38,500 feet of the main ditch had been completed during which time he issued six estimates and certificates of work done. He resigned, and in his report complained of the work theretofore done, and expressly said that on account of defects no part of the work had been accepted by him or the board. Mr. Charles Reynolds was appointed to succeed Mr. Snook, and he took immediate charge of the work, continuing as engineer in.charge until the completion of the ditch.

The open ditch constructed with dredge machines in District No. 4 consists .of a main line and seven laterals or branches which connect either with the main line or with one'another. The combined length of the main ditch and laterals is about 34.34 .miles. The amount of excavation was 795,051’ cubic yards, and the__area of the .district was 28,000 acres. The country through which the ditch was constructed is low, level, and flat, covered in large part with sloughs, swamps, and peat bogs. The district is crossed by two lines of railroad. The Chicago & Great Western crosses the main ditch at about station 637. This is about 1,000' feet south of the beginning of the main ditch. The Illinois Central Railroad, passing through the southern part of the district, and crosses the main line at or near station 139. It also touches Lateral No. 4 at its source. The main line of the ditch begins in Newark township, extends in a southerly direction through Colfax township into Washington township, where it ends in Bruchy creek. It is 73,570 feet long or about fourteen miles in length. Lateral No. 1 begins in a swamp in the southern part of Newark township in section 35. It extends almost due east through three townships, then turns and runs in a southwesterly direction to the place where it joins the main line in the southern part of Colfax township some distance north of the Illinois Central track. It is 40,800 feet or about 7% miles in length. It flows into the main line from the east. It has two branches— that is, two other shorter laterals flowing into Lateral No. 1 — No. 3, from the north, and No. 7, from the south. Lateral No. 3 is wholly within Colfax township, is 10,400 feet or about 1% miles in length. Lateral No. 7 is wholly within Colfax township, and it is 17,707 feet or about three miles in length. Another lateral, Lateral No. 4, flows into the main line of the ditch from the east. This lateral is wholly within Washington township. It begins in section 2 on the north line of Washington township and flows southwest, joining the main line of the ditch, 500 feet north of the lower end thereof. Three laterals flow into the main ditch from the west. These three are wholly within Colfax township. Lateral No. 5, the most northern, is 10,000 feet long. Lateral No. 6 is south of Lateral No. 5; it is about 8,000 feet in length. Lateral No. 2 is by far the longest of the three laterals on the west of the main ditch, being 20,540 feet in length. All of these laterals extend out through swamps and bogs. The entire line of the ditch, including both the main line and the laterals, was divided into stations of one hundred feet each, by the engineer in charge of the construction. This was done for- the direction of the workmen who built the ditch. These stations were marked by stakes on which there were written directions to the workmen, stating the, dimensions of the ditch.

Claiming that the ditch was completed according to contract, plaintiff, on September 14, 1908, demanded acceptance thereof by the county and the payment of the twenty percent reserve. The board of supervisors refused to take any action until they had the report of Eeynolds, the engineer in charge. Eeynolds was then requested to make a report which he did on the same day and filed the same with the county auditor. This report was not satisfactory to some members of the board, and Eeynolds was directed to make another report. This he did and the second report was filed November 30, 1908. The board then refused to take any action regarding the acceptance or rejection of the work, and this action was commenced on December 31, 1908. There is not much dispute regarding the law of the case and the main contentions are over the facts. Plaintiffs claim that they substantially performed their contract according to the terms thereof and of the specifications which are made a part thereof. This is denied by defendants, and they point out the following defects in the brief filed for them:

(a) Failure to leave a clear berm of eight feet between the excavation and the spoil bank, and that the berm actually left was not six feet in width, but was in width very much less than six feet, and that the same was not a clear berm but that said berm was negligently and carelessly allowed and permitted to be and become obstructed with loose clods, lumps of earth, and other material; and that the contractors wholly failed to comply with said provisions of the contract.

(b) Failure to comply with the terms of the contract in the slope of the waste banks on the side next to the ditch, in that said waste banks were left at a slope much greater than ‘1 to 1.’

(c)' That ditches constructed did not have full dimensions of cross-sections and berms, and were not free from rough or irregular bottoms, and did not have sides regular and free from overhanging sods and dirt; that said ditches had rough and irregular bottoms, and that earth and sods were allowed and permitted to overhang along the sides thereof; that the sides are irregular and rough, and that the bottom of the ditch was not constructed upon an even grade as required by the specifications and as ordered by the engineer. Also alleging that said matters had been pointed out to the above plaintiff, and that he and Ward Bros, had been notified thereof. . . .

(d) That plaintiff wholly failed to comply with the provisions of the contract as to keeping each mile of said ditch in good condition and repair until finally accepted by the first parties to said contract. ,

(e) That said ditches have not been excavated to the depth required by the contract and' specifications, and that they have not been maintained in repair, and that said ditches are out of repair in all respects as stated. . . .

(g) v That by the terms of said contract all difficulty or dispute as to the construction of the terms thereof, including the plans and specifications, should be referred to the engineer in charge, and that his decision should be final and conclusive upon both parties; that a difficulty existed between plaintiff and defendants, and that said difficulty was submitted to the engineer, and that he made full investigation and examination of said work, and that Exhibit A attached to said answer is his determination and report hereon.

In amendment to the answers filed by said defendants, it is alleged:

That plaintiff wholly failed to construct said improvement in sections of one mile, and made no effort to that end; that the first several miles of said ditch were never constructed' in accordance with the contract and that no claim was made by Ward Bros, that the same were so completed; that no one mile of said ditch was ever presented for acceptance until the entire ditch was presented in the month of October or November, 1908, but that said plaintiff and Ward Bros, at all times admitted that said ditch was incomplete, that the same had not been completed according to contract, and that neither the first mile nor any other mile or section thereof was completed according to the terms of the contract or to the plans and specifications for said improvement; that said Ward Bros, promised and agreed that additional work would be done on said ditch before the same would be presented for acceptance and that said ditch would be cleaned out and the dirt and silt removed therefrom, and the work made to comply with the contract and specifications; that all parties to said contract acquiesced in and assented to a construction thereof requiring Ward Bros, before the final acceptance of said improvement to construct the same according to the terms of their said contract and to excavate and remove the sediment, silt, earth, sods, and caving banks from the channel of said ditch. That by the conduct, promises, and agreements of the parties the contract has received a practical construction, and that all parties are bound thereby, and are estopped to set up and allege any different construction of said contract.

Defendants also allege that any attempt to vary or change the terms and requirements of the specifications for said improvement after the bid of Ward Bros, was received and accepted was beyond the authority of the board of supervisors, aud was without legal or 'binding force or effect.

I. Such are the issues of fact, and from this statement will be gathered the propositions of law involved. The action being on contract, and not for quantum meruit, plaintiffs, in order to recover, must show a substantial compliance with the terms thereof. They are hoTind hy the terms of the agreement, and can not escape because of impossibility to substantially comply with the provisions thereof. Monaghan v. Vanatta, 144 Iowa, 119; Wernli v. Collins, 87 Iowa, 548; Hunt v. Tuttle, 125 Iowa, 676; Duncan v. Gray, 108 Iowa, 599; McCain v. City of Des Moines, 128 Iowa, 331.

The rule as to what constitutes substantial performance is thus stated by a learned author after consulting many authorities bearing upon the subject which are cited in a note to the text: “ ‘Substantial performance,’ as defined by the cases, permits only such omissions or deviations from the contract as are inadvertent or unintentional, are not due to bad faith, do not impair the structure as a whole, are remediable without doing material damage to other parts of the building in tearing down and reconstructing, and may without injustice be compensated for by deductions from the contract price. So much is allowed in building contracts because of the hardship to the contractor if slight, unintentional deviations should bar his recovery.” See 9 Cyc. 602-603. This is the main proposition of law involved, although some collateral ones are presented which will be disposed of as they are reached.

II. Section 5 of chapter 85 of the Acts of the ThirtyHirst General Assembly, reads as follows: “The board shall cause notice to be given by publication, once each week, for four consecutive weeks in some newspaper published in the county wherein such improvement is located and such additional publication elsewhere as they may direct, of the time and place of letting the work of construction of said improvement, and in such notice they shall specify the approximate -amount of work to be done in each section and the time fixed for the commencement and completion thereof and they shall award contract or contracts for each section of the work to the lowest responsible bidder considering the same as a whole, exercising their own discretion as to letting said work as a whole or in sections and reserving the right to reject any and all bids and readvertise the letting of the work.”

Compliance with this provision was had in this case, and the board subdivided the work into sections which varied in length from one hundred feet to something like nine miles. Work was to be constructed according to plans and specifications then on file in the auditor’s office. The notice contemplated the making of a contract after acceptance of the bid and this was done. The specifications contained the following among other provisions:

Side slope of all ditches to be one to one.

A clear berm of eight feet shall be left between the excavation and the spoil bank.

The slope of waste banks on side next to ditch shall not be greater than one to one.

Waterways shall be constructed at such points as may be designated by engineer, such waterways to have bottom graded from the bottom of the ditch to points set out by engineer, with an angle to ditch; -width of bottom, slope of sides and width of berm as may be specified by him; but in no ease will any requirements in the construction of such waterways be exacted from the contractor other than can be performed by the machinery used in the construction of the ditch at such waterways.

The excavated material shall be deposited upon one or both sides of the ditch, as the engineer may determine. In general, the deposit shall be made upon both sides, but in running along old channel or running along highways contractor may be required to deposit material only on one side of ditch.

The ditches as accepted under the terms of this contract must have full dimensions of cross-section and helm as ordered by the engineer, must be free from rough or irregular bottoms and must have sides regular and free from overhanging sods and dirt.

When any change of specifications necessary to the better construction of the ditch or drain is found advisable by the engineer, the right is reserved to make such change at any point in its line at any time previous to actual construction of ditch at such point.

The word ‘engineer’ as used in'these specifications shall be held to refer to the engineer legally appointed to have charge of this work, or his authorized assistant. . . .

All ditches shall be located and graded according to stakes set in the field by the engineer.

A part of Ward Bros.’ proposal reads in this wise:

Having examined the annexed proposals of Webster County Drainage District No. 4 and accompanying form of contract, we do hereby agree and contract with said Webster County Drainage District No. 4 (in case the work is awarded to us), to do the work required on sections hereinafter filled out and designated by us, in all respects in accordance with contract executed at the following rate per cubic yard of excavation: Parties bidding on the work as a whole, without regard to sections, will use the following: Por entire work as a whole ten (10) cents per cubic yard for earth-for stone-for hardpan, except railroad crossings. . And we agree to finish said work and enter into contract and furnish bond as required by said proposal.

This bid having been accepted, a formal written contract was entered into between the parties under date of September 14, 1905. Among other things we find this as the first provision thereof: “(Subject to such changes as may be agreed upon by all parties thereto.)” This was followed by the written part of the contract which so far as material reads as follows:

It is further expressly understood and agreed by and between the parties hereto that the maps, profiles, blue prints and specifications, and the proposals of the first and second, parties shall in all respects be co-operative with, and they are hereby incorporated into and become a part of this contract.

It is further understood that in case said dredging machine can not, consistently with skilled management, make a berm as provided in the specifications, such berm shall be, at least, six feet .in width. And the party of the second part hereby covenants to do said work at the following prices per cubic yard of material excavated, as set forth in bid therefor: Sections 1 to 16 inclusive, for the entire work except railroad crossing, 10 cents per cubic yard,.

The engineer in charge of the work shall furnish the second party monthly estimates of the amount of work done on- each section, and the amount due from Webster County, a duplicate of which he shall file with the auditor of Webster County herein. Upon the filing of such statement said auditor shall draw a warrant in favor of the second party for eighty percentum of the amount due from Webster County. When said improvement, or drainage ditch, is completed to the satisfaction of the engineer in charge of the work, and accepted by the board of supervisors of Webster County, the engineer shall certify such facts to the -— county auditor, and the county auditor shall draw a warrant for the balance due from Webster County. . . Under no circumstances will the party of the second part be allowed any pay for work or excavation not embraced within the terms of this agreement. . . . The party of the second part shall keep each mile of ditch constructed by it in good condition and repair, at its own expense until the same is finally accepted by the parties of the first part, each mile to be accepted by the first parties when completed according to the specifications and terms of this contract. Party of the second part shall be liable for all damages occasioned by the negligence and incompetency of its agents or servants. Should there be any difficulty between the parties hereto as to the construction of any of the terms or provisions of this agreement, including the plans and specifications hereinbefore made a part hereof, relating to the work to be done, such difference shall be referred to the engineer employed by the parties of the first part in charge of the work, and his decision shall be final and conclusive upon both parties. To he constructed with a dredge as nearly, to the slope prescribed as practicable when skillfully operated. Party of second part not to be held liable for damages done to completed work on account of freshets. The final instruction of tbe engineer and final setting out of the work upon the ground shall be considered an order to the contractor for its construction, and estimates shall be made for excavation according to such orders.

The italicized portions of these quotations were interlined and were not in the form of contract sent to bidders. As it is contended that these and some other portions of the contract were unauthorized' by law we kere quote from section 9 of chapter 68, Acts Thirtieth General Assembly, as follows: “The engineer in charge of the construction shall furnish monthly estimates of the amount of work done on each section, and upon filing the same with the auditor, he shall draw a warrant in favor of such contractor, or deliver to him improvement certificates as the case may be, for eighty percentum of the value of the work done according to the estimates, and when the improvement is completed to the satisfaction of the engineer in charge thereof, and so certified to the board, and approved by it, the auditor shall draw a warrant in favor of said contractor upon the levee or drainage fund, or deliver to him improvement certificates as the case may be.”

That part of the contract with reference to the completion and acceptance of each mile of ditch and the repair thereof is said to be without authority of law, and therefore void. This contention is we think true in part; for, as- said in Monaghan v. Vanatta, 144 Iowa, 119, the board of supervisors has no power to pass upon estimates preceding the final report of the engineer. Again in the same case we said:

It is only when the work is completed that the board of supervisors is called upon to approve or disapprove it, and, if approved, the auditor to issue a warrant or certificate for the ‘balance due.’ The main purpose of withholding from the estimates the twenty percent reserve is to insure the completion of the improvement. But another purpose also is served by obviating overpayment, through mistake or design, to the contractor. The statute does not direct payment of the twenty per centum reserved, but of the ‘balance due,’ and this can only'be ascertained from a careful computation of the work performed under the contract at the prices agreed upon and the deduction of the sums paid under the engineer’s estimates. This computation is to be made by the county auditor, based on estimates and reports of the engineer of the improvement ordered by the board of supervisors.

In Devlin v. New York, 124 App. Div. 184 (108 N. Y. Supp. 139), the court said in speaking of estimates upon which payments are made:

These progress certificates differ in character from the final certificate made at the completion of the whole work, upon which the final payment is to be made. The final certificate is conclusive upon the contractor; but it is expressly provided that all prior certificates or estimates, upon which eighty-five percent payments may be made are merely estimates and subject to the corrections of such final certificate. The progress certificate is an estimate such as in the opinion of the engineer shall be just and fair, is not required to be made by strict measurement, but may be made by measurement or by estimation, and is sufficient if approximate only.

But whatever the rule upon this subject the parties did not insist upon this provision of the contract, and the board of supervisors could not delegate its duty of final acceptance to anyone. Nor could it accept until the completion of the work as a whole.

We have no doubt of the right of the parties to stipulate as to who should stand the loss or damage to the ditch due to unforeseen and unavoidable causes, and can not agree with counsel that this part of the contract was ultra vires. But conceding arguendo that both provisions were and are invalid, they are not such as to de~ stroy the contract in toto. The most that ° 1 1 appellees are entitled to is to have these disregarded, for the work has been done, a large number of estimates made, and the ditch is manifestly of some benefit to those whose lands are drained thereby.

Again, it is contended that one of the provisions of the contract from which we have quoted makes the decision of the engineer final and conclusive, and that as the engineer disapproved of the work, and refused ... , . . to receive it as being m compliance with the contract, that is the end of the controversy. The mere reading of the provision relied upon will show that his claim is entirely too broad. By the terms of the contract it was the decision of the engineer regarding the construction of the contract, including the plans and specifications which was to be final. This is quite another thing from passing upon the character of the work and the completion of the improvement. It is doubtful if the board could delegate this latter power, even were it disposed to do so. Both the contract and the law provide that when the improvement is completed to the satisfaction of the engineer in charge and accepted by the board a warrant shall issue, etc. See Code Supp. 190Y, section 1989-a9.

Defendants contend that the engineer was not satisfied as to the nature of the work and so reported to the board, and that this is an end of the inquiry. As it is charged by plaintiffs that the rejection of the work was made in bad faith and by reason °f collusion between some of the members 0f ^ landowners in the proposed district, and the engineer, for the purpose of defeating the claim for the improvement, a question of fact is presented which is determinative of the matter. It is doubtless true that the ditch must be completed to the satisfaction of the engineer; but the contractors can not be deprived of their rights through the failure of the engineer to act, nor should they be defeated by his fraud or through his collusion. And doubtless capricious or arbitrary action on his part will be sufficient upon which to predicate a finding of fraud. Bush v. Jones, 144 Fed. 942 (75 C. C. A. 582, 6 L. R. A. (N. S.) 774); Coorsen v. Ziehl, 103 Wis. 381 (79 N. W. 562). So much by way of premise to the real issues in the case.

The record shows that the county appointed engineers who had charge of the work of construction; that these engineers made monthly estimates of the amount of the work done upon which warrants were issued to the contractor as provided by law; and that when the work was completed and tendered to the engineer and the board for acceptance the engineer was not satisfied with the work as a whole, and made many objections thereto which were set forth in the two reports filed by him. In the first he made the following objections:

That part of the work which was under my supervision at the time of construction was dug to grade,- except two places on lateral No. 7, which have since been excavated by hand. The ditch at the present time, particularly the upper ends of the different laterals, is filled above grade from one to three feet with silt and mud. The banks are badly caved off in places in the ditch, thereby obstructing the free flow of water. Considerable damage has been done to the ditch by the washing in of the waste banks and berms by freshets which have carried considerable dirt and sand into the ditch. In order to put these ditches in first-class shape, bringing them to grade and furnishing ample outlets to adjoining lands, it will be necessary to clean them out by machine as handwork is only of a temporary nature, and does not last any length of time. Viewing these conditions at the present time, I would report the ditch is not completed according to plans and specifications.

In the second report he made more specific objections and, in order that the matter may be thoroughly understood, we here copy these objections in full:

I wish to make the following report on Drain No. 4. I find the ditches throughout to be generally above grade at this time, and it is my opinion that the condition of. the ditches at this time are practically the same as they were at the completion of Lateral No. 4, the last lateral to be excavated by the contractor.

The following is a more detailed report of the several laterals:

Lateral No, 1. Beginning at station 0 at the upper end of this lateral, and running to station 26, the ditch is from one to three feet above grade. From station 26 to station 177 the ditch is below grade from one to ten inches, and in places, a foot. From station 177 .to station 320, the ditch varies from a few inches to two feet above grade.

Lateral No. 2. This lateral is from one to two and one-half feet above grade from station 0 at the upper end to station 75. The berm and slopes on this portion of this ' lateral are in bad condition, especially through the ponds, where the berm has caved off in places, and part of the waste bank slid into the ditch.

Lateral No. 3. This, lateral at this time is practically at grade, varying from a few inches below grade to six inches above grade from station 0 at the outlet to station 57. From station 57 to station 61 through a large pond the ditch is above grade one and one-half feet holding the water back in that pond. The upper end of this lateral is also in bad condition, being above grade and the berms and slopes in bad shape.

Lateral No. 4. This lateral is from grade to two feet above grade from the'upper end of station 0 to station 160 in section 9. From this point to near the junction with the main line the ditch is below grade.

Lateral No. 5. This lateral is in bad condition, particularly the upper end from station 0 to about station 40. From station 0 to station 10, the ditch is from one to three and one-half feet above grade, with very poor berms and slopes. From station 10 to 40 the ditch is from one-half to one and one-half feet above grade. The balance of the lateral from station 40 to station 100 is in fair condition. This lateral is wider than specifications required on account of having been dug by a machine larger than was necessary.

Lateral No. 6. This lateral is in about the same condition as lateral No. 5. From station 0 to station 10 the lateral is from one to three feet above grade, with very bad berms and slopes. From station 10 to 65 the ditch is from one-half to two feet above grade, with a bad cave at station 42 to station 46, causing an obstruction to the water. The balance of the lateral from station 65 to station 80 is in nearer keeping with the specifications.

Lateral No. 1. The lower end of lateral 1 from station 0 to station 50 is in good condition and is at or below grade at this time. From station 50 to station 186 is from one to two and one-half feet above grade. The berm is in fair shape from station 15 to the upper end, having been cleaned off.

Main Line. The upper end of the main line from station 0 to station 11 or the first railroad crossing is above grade from one-half to one and one-half feet. From this point down to station 588 the ditch is more or less above grade, with portions of it at grade. At' station 588 to 589 there is a place where the ditch is from one to two feet above grade, varying from six inches to one foot above grade, with portions of it below or at grade. The berms on the main line are not in the best condition being ragged in places and covered with waste earth.

This report is based upon levels run under my supervision during the month of November, 1908, and a personal inspection of the ditches since their completion and since the water has run out of them. All of which I respectfully submit:

Upon the coming in of these reports the board of supervisors gave plaintiffs, the receiver and surety on Ward Bros.’ bond, written notice of the contents of the second report, and directed that they remedy the defects, and complete the work within six months from the receipt of the notice, and that in the event of their failure to do so the county would proceed to complete the improvement according to tbe terms of its contract, and charge the expense thereof to the contractors and the surety on the bond. While the receiver was' acting as superintendent for Ward Bros., and some time during the summer of 1908, he constructed a dredge for the purpose of cleaning out the ditches, and it was used upon some of the laterals during the months of June, July, and August of that year. Some time in September this work of cleaning out the ditches was abandoned by plaintiffs either because of lack of funds or because they concluded that they were not required to do so, and they tendered the work as a completed job some time in that month. Then 'followed the reports of the engineer to which we have called attention and the notice by the board followed these reports. As already observed the contract provided that the contractors should keep each mile of the ditch in good condition and repair at its own expense until the same was finally accepted by the county authorities, each mile to be accepted by the county when completed, according to the specifications and terms of the contract. The contract also provided that the contractors should not be held liable for damages done to completed work on account of freshets. It should also be noted in this connection that the specifications, which were a part of the contract, provided that the ditches as accepted should have the full dimensions of cross-sections and berm as ordered by the engineer, should be free from rough and irregular bottoms, and have sides regular and free from overhanging sods and dirt.

The case really turns' in our opinion, upon the construction and effect to be given these provisions. If the ditch had been accepted mile by mile by the county authorities pursuant to the terms of the contract we should have much difficulty with the .case. But this was not done. Nor were estimates made upon any mileage basis. Work was being done upon the main ditch and upon different laterals at the same time, and plaintiffs did not insist at any time upon acceptance by tbe county of tbe work mile by mile. Neither of the engineers representing the county made estimates upon the mileage basis, nor did they accept any part of the work on that basis. They did superintend the work, made complaints from time to time of the character thereof, which were as a rule corrected by the plaintiffs, but plaintiffs at no time offered any part of the work as a completed job until they tendered the whole improvement as being in compliance with the contract and asked that they receive the balance due thereunder. This brought forth the reports of the engineer to which we have already referred.

At the outset we may say that if the defects relied upon related solely to the side slope of the ditches we should be inclined, in view of the further provision of the contract that this slope was only to be as nearly as practicable to the provisions of the specifications as it could be done with a dredge skillfully operated, to agree with appellant, and find that there was a substantial complaince with the terms of the contract in this regard. We should have a great deal more difficulty with the claim that the berm was not left as provided in the contract and with the contention that the slope of the water banks was not as required by the contract. ■ Indeed plaintiffs virtually conceded that the berms were not of the required width, were not clear of obstructions, and that the slope of the waste banks was not according to the contract at any time. But the controlling points in the case in this connection are, that when the work was tendered for final acceptance it was not completed to the satisfaction of the engineer, and at that time a large part of the main ditch and most of the laterals were not of the required depth. The fact that the ditches were above grade was due largely to the fact that silt had 'deposited therein to the depth of from six inches to more than two feet. In view of this situation it was incumbent on plaintiffs to show that the engineer’s dissatisfaction with the work was either arbitrary or capricious or the result of fraud or collusion and that it was not required of them that they keep the ditches in good condition and repair down to the time that they were tendered to the engineer or the county authorities for acceptance under the contract. We are quite clear that no matter whether the provision as to acceptance of the work mile by mile was within the power and authority of the county authorities or not, that the engineer had no authority to make this acceptance for them and that as he did not do it and was not ■called upon to do so by anyone, and as the plaintiffs did not insist upon such acceptance by the board of supervisors or other competent authority, the provision was waived, and that we must construe the contract as if no such provision were made save as it indicates the thought of the parties as to who should keep the ditches in repair and in condition while the work was in progress. ’ One clause of the. contract provides that when accepted the ditches should have the full dimensions of cross-section and berm as ordered by the engineers, and should have sides free from overhanging sods and dirt. Another significant provision was that the contractors should not be held liable for damages done to the completed work on account of freshets. Under familiar rules this inclusion of necessity implied the exclusion of other matters. The 'clear inference is that for any other damage to the improvement the contractors were to be held liable. Again the parties by their acts and conduct put a construction upon the contract which is in line with these suggestions. Plaintiffs did not act as if they considered their obligation at an end when they made the excavation according to the specifications for they went back many times to remove silt and dirt, and shortly before their failure Ward Bros., had constructed a special dredge for the purpose of putting the ditches in condition by removing the deposits therein. Aside from this, however, plaintiffs of necessity in this form of action, as sume a rather heavy burden because of the adverse reports of the county engineer. The improvement was not completed to the satisfaction of the engineer in charge thereof, and to avoid the effect of his reports plaintiffs are at the very least in this form of action required to show that the engineer was guilty of some fraud or collusion or that the action of the engineer was wholly arbitrary or capricious. The record does not justify us in so finding. Indeed plaintiffs practically concede, or if they do not admit, the record is practically conclusive upon the proposition, that when the improvement was tendered for acceptance the work was not in accord with the specifications. At that time the berms were not as called for, the waste banks did not have the slopes required, the berms were not clear and free from obstruction, and many of the ditches were not of the required depth as shown by the cross-sections.

We can not get away from the thought that no matter what the rule in the absence of contract, the parties in this case agreed that the contractors should keep the ditches in good condition and repair down until the time the improvement was presented for acceptance. ITnder that contract plaintiffs might have insisted that the ditches be accepted mile by mile and conceding such a provision valid might have relieved themselves from all future liability after such acceptance. But they did not do so, and by conduct waived this provision, which was for their benefit. That they might so waive is clear and that they did so is equally apparent. Notwithstanding any intimations which may be gathered from what has already been said we do not wish at this time to make any pronouncement upon the validity of that part of the contract providing for accejitance mile by mile. It will be noticed that the statute (Code Supp. 1907, section 1989-a9) provides that when the improvement is completed to the satisfaction of the engineer, and so certified to the board and approved by it a warrant shall issue, etc. Mile by mile acceptance, if the provision be valid, would undoubtedly relieve the contractors from any duty to keep in repair and estop the county from complaining of any part of the work save perhaps that not accepted when the improvement was completed. Much might be said in support of the proposition that the inclusion of this proviso in the contract after bids were accepted based upon the notices to bidders and the specifications from which we have quoted was of such advantage to the successful bidder as to be obnoxious because of departure from the specifications upon which other bidders made their proposals; but it is not necessary at this time to determine thé matter, and we do not do so. Doubtless it was competent to make provision as to who should bear the losses, if any, during the progress of the work and as to who should keep the completed part of an incomplete improvement in repair; but here again the thought arises that all bidders should be placed on an equality and each notified of these conditions. A vast amount of testimony was taken in the case, and we have gone over the record with care in order to discover the exact points of difference. These we have stated without attempting to reproduce much of the testimony bearing upon disputed propositions. Defendants are making all possible objections to the improvement, some of which are hypercritical and without merit; but no one can read the record without being impressed with the thought that the improvement did not, when completed and presented for acceptance, substantially comply with the contract.

Passing these points for the present, we may say that had we reached a contrary conclusion we should have had great difficulty in finding any relief for plaintiff in this form of action in view of the fact that both the engineer in charge of the work and the .... . . ... county authorities have acted m accord with the terms of the statute. The engineer has made adverse reports and the county authorities have refused to approve the work. Gránted that notwithstanding these facts maivdamus will lie to control their action and to reverse their findings, plaintiffs, of necessity, labor under the heavy burden of showing fraud or at least want of good faith on the part of these officials. The record does not justify such finding, and even were we disposed to say that the work was in substantial compliance with the terms of the contract, we should hesitate in an action of mandamus, brought, to compel the defendants to act, to say that while they have acted we will assume superior knowledge to that possessed by the engineer in charge, and that although the work was not done to his satisfaction he should have been satisfied. Indeed, that in itself would not in our opinion justify us in reversing his finding, for something more than error in judgment must be found to justify the issuance of a writ of mandamus. These principles are quite fundamental, and we need only cite in support thereof: People v. Matthies, 179 N. Y. 242 (72 N. E. 103); Scripture v. Burns, 59 Iowa, 70; Preston v. Board, 124 Iowa, 335; Sullivan v. Robbins, 109 Iowa, 235; City v. Berry, 71 Ohio St. 428 (73 N. E. 515); State v. Clarke (Minn.) 128 N. W. 1008; State v. Churchill, 37 Neb. 702 (56 N. W. 84). The Clarke case, supra, is directly in point.

Again, if plaintiffs were attempting to enforce that part of the contract relating to acceptance mile by mile they would immediately be met with the objection that the action of mandamus will not lie to enforce purely contractual rights. Such an extraordinary remedy is for the purpose of enforcing the exercise of a duty imposed by law. This, too, is fundamental. State v. Icke, 136 Wis. 583 (118 N. W. 196, 20 L. R. A. (N. S.) 800); State v. Milwaukee College, 128 Wis. 7 (106 N. W. 116, 116 Am. St. Rep. 21) ; Putnam Co. v. Town, 28 R. I. 422 (67 Atl. 733) ; City v. Telephone Co., 230 Ill. 157 (82 N. E. 607, 13 L. R. A. (N. S.) 1084).

But appellants finally contend that as the • action is now tried as in equity they are entitled to some relief, and suggest that, if full relief is not granted, they should at least have judgment and decree for the value ^ wor]j. or contract prioe "less any sum found necessary to complete the improvement according to contract. They suggest that from the record if appears ■that the sum of $10,600 will put the ditches in good condition, and that they should have judgment in some form for the amount reserved under the contract less this sum, or $18,913.37. The difficulty here is that this would be giving judgment for plaintiff on the theory that the action is upon quantum meruit. The pleadings make no-such case. Plaintiff’s action is primarily one of mandamus, and in so far as he makes any claim under the contract it is for substantial, if not full, compliance therewith. There is no suggestion in the pleadings that he seeks to recover for the value of work done or services performed. Hence he is not in this action entitled to that relief. Moreover, this concession is fatal to his claim of substantial performance. If $10,000 of an expenditure is required to complete the improvement according to contract, then, substantial performance thereof is distinctly negatived. We do not say that plaintiff has no remedy. That question is not now before us. What we hold is that he is not entitled to a writ of mandamus, and that he does not show himself entitled to other equitable relief. ú

Appellants’ motion to strike appellee’s second amended abstract is overruled.

The decree must be, and it is, affirmed.

SUPPLEMENTAL OPINION.

On petition for rehearing. — Overruled.

Per Ouriam. — In a petition for a rehearing our attention is again called to the matter discussed in the last paragraph of the opinion heretofore filed.’ It is argued that as the opinion now stands it amounts to an adjudication, forever depriving the plaintiff of any relief whatever. This was not the purpose of the decisoin, and in order to save that question the court has, upon reflection, determined to remand the case to the district court in order that plaintiff may there try out the question as to whether or not he is entitled to any relief against the defendants or to 'a judgment for any part of the amount retained by the defendants of the purchase price for the ditch on the theory of quantum meruit, or upon any other correct legal basis, giving to plaintiff the right to amend if he is so advised and to the defendants the right to challenge plaintiff’s right to recover or the amount thereof. This will save the retaking of a vast amount of testimony and prevent the decree already rendered from being considered an adjudication. We are the more ready to do this because of the fact that the case was not originally tried or considered by the district judge as involving the matter of plaintiff’s right to recover upon quantum meruit. It may be doubted whether that question was properly presented on the original hearing. That question we also do not wish to foreclose by the opinion already filed.

The result is that the original ojúnion will be modified to this extent, and the petition for rehearing will be overruled.  