These four appeals are the outgrowth of the principal contract entered into by Grant county with the J. B. Evans Construction Company for the erection of a courthouse referred to in the case of Gold Bros. Brick Co. v. Grant County, 40 S. D. 570, 168 N. W. 855. Claims for mechanics’ liens were filed by the several respondents. The claims of the respondents to recover from the county are based entirely upon the mechanics’ lien law, and no claim is made under the statute discussed in the -Gold Bros. Brick Co. Case. The county began an action making all lien claimants parties as well as the principal contractor and its surety, the Maryland Casualty 'Company. The several respondents upon these appeals ‘by answer and crossbill set up their liens and prayed enforcement of them. Separate judgments were entered for the lien claimants establishing the liens as against the funds in the possession of and under control of the county. From the judgments and orders denying new trial the county has appealed. The appeals were argued together in this court.
[1] Two questions are common to all of the appeals. .The first question is as to the meaning of the clause, “acceptance of the work,” in section 717, Rev. Code Civ. Proc. 1903 (section 1664, Rev. Code 1919), viz.:
“All claim-s for liens under the provisions of this article shall cease to have any validity or to be binding upon the county or corporation or the contractor unless an action to enforce the same, as herein provided, shall be commenced within thirty days from the acceptance of the work for which the same shall be claimed.”
Similar contentions were made as to the meaning of said clause as were made in Gold Bros. Brick Co. v. Grant Co., supra, and therefore that the 30 days had run prior to the beginning of this action. In that case we construed the clause, “acceptance of the work,” appearing in section 3, c. 245, Laws 1909 (Rev. Code 1919, § 7617), to mean acceptance of the job to be performed by the principal-contractor. Such clause has the same meaning here. In that case the work had not been accepted at the time that action was begun neither had it been accepted at the time the county began the action which has resulted in these appeals, nor had it been accepted at the time that the answers and cross-bills were *611served. So that the contention of appellant in these appeals as to the running of the 30 days’ statute has no merit.
[2] The second question common to all of the appeals is whether there were any moneys in the control of Grant county due at the time of the filing of the lien claims or to become due within the meaning of,that portion of section 713, Rev. 'Code Civ. Proc. 1903 (section 1660, Rev. Code 1919), which reads as follows :
“Shall have for his labor done or materials furnished a lien upon all moneys in the control of such county or corporation due or to become due under such contract.”
Article 5 of the contract between the Evans Company and th'e county is as follows:
“Should the contractors at any time refuse to supply a sufficiency of properly skilled workmen or of materials of the proper quality, or fail in any respect to prosecute the work with promptness and diligence, or fail in the performance of any of the agreements herein contained, such refusal, neglect or failure being certified by the architect, the owner shall be at liberty, after three days’ written notice to the contractors, to provide any such labor or materials and to deduct the cost thereof from any money then due or thereafter to become due to the contractors under this contract, and if the architect shall certify that such refusal, neglect or failure is sufficient ground for such action, the owner shall also be at. liberty to terminate the employment of the contractor for the said work and to enter upon the premises and take possession for the purpose of completing the work included under this contract of all materials, tools and appliances thereon and to employ any other person or persons to finish the work, and to provide the materials therefor; and in case of such discontinuance of the employment of the contractors they shall not be entitled to receive any further payment under this contract until the said work shall be wholly finished, at which time, if the unpaid balance of the amount to be paid under this contract shall exceed the expense incurred by the owner in finishing the work, such excess shall be paid by the owner to the contractors; but if such expense shall exceed such unpaid .balance, the contractors shall pay the difference to the owner. The expense .incurred by the owner as herein provided,- either for furr *612'nishing materials or for finishing the Work, and any'damage incurred through .such default, shall be audited and certified ¡by the ■ architect, whose certificate .thereof shall be conclusive upon the parties.”
The contractor had been proceeding with-the work’ and had been paid 85 per cent, of six estimates aggregating $44,714.25. The evidence tends to show that in the spring of 1916 the contractor defaulted in the performance of his contract, and on March ■ 31, 1916, the architect issued to the county a formal certificate in part as follows:
“I wish to certify to you as per article No. 5 of said contract, that the J. B. Evans Construction Company, contractors, have refused, neglected and failed to prosecute the work with promptness and diligence since March 15, 1916, and you have just cause for giving them and their bondsmen the three (3) days’ notice stipulated therein.”
On April 4, 1916, the county gave to the contractor and its surety the three days’ notice provided for in article 5 of the contract, and the company practically ceased its operations. On April 13, 1916, the architect submitted the seventh estimate, showing, not that the contractor was entitled to it, but that the surety company of the contractor was entitled under the contract to be paid the sum of $7,242 ; that being 85 per cent, of the amount of the estimate, and that the 15 per cent, withheld therefrom, including the 15 per cent, withholdings under previous estimates, amounted to ' $9,168.75. On March 30, April 3, April 15, and April 18, 1916, the several respondents respectively filed their lien claims with the ' county auditor. On or about April 18, 1916, a telegram was received by the county from the surety company authorizing the payment of the 85 per cent, of the seventh estimate to one Atkinson. ’ Thereupon a warrant was drawn to “Wm. E. Atkinson, for the ■Maryland 'Casualty Co.” in the said sum of $7,242, and it was ' paid on April 20, 1916. Therefore at the time of the issuance and ' payment of such warrant the lien claims of all four respondents 'were on file. It is the contention of respondents that the seventh estimate should first have been applied to the payment of their liens'; that the payment to Atkinson was a recognition that such sum was due under the contract, and therefore that the liens at*613tached to the fund. It is the contention of the county that, after the certificate of the architect and the giving of notice to the contractor, the county was authorized, under article 5 of the contract, to withhold any further payments to the Evans. Company and apply them to the completion of the building, and that the lien claimants could not have enforced the payment of their liens until the completion of the building, and not then unless there were unexpended funds on hand.
In the case of Sioux Falls Pressed Brick Co. v. Board of Education of Sioux Falls, 25 S. D. 36, 125 N. W. 291, this court held that the liens of lien claimants did not attach to the fund created by the withholding according to the contract of 20 per cent, of the amount of the estimates due the contractor, and that at the completion of the building, the liens would only attach to such portion of such fund as was not used by the board in the completion of the building. We are of the ppinion that the principles enunciated in that decision are applicable here. At the time of the completed default, there was nothing due the contractor under the terms of the contract. The county had the right to retain, not only the fund of 15 pér cent., aggregating the sum of $9,168.75, but by article 5 of the contract it had the right to retain the said sum of $7,242 thereafter paid by it to Atkinson for the surety company. If the fund of $7,242 had been retained by the county and not paid to Atkinson, the lien claimants could not have enforced the application of it to the payment of their liens, éxeept under the conditions outlined in the Sioux Falls case. We think such fund should, so far as the lien claimants are concerned, be treated as though it had been retained by the county and used in the completion of the building. If so treated, the fact that the county wrongfully paid the fund to Atkinson for the surety company, if such payment was wrongful, is no concern of the lien claimants. It is of no more concern to them than if the county had misappropriated the fund to some other purpose utterly foreign to courthouse purposes. That may be a matter to be settled between the county and the surety company. The county auditor testified that the county expended to complete the building according to contract approximately $40,000 in excess of the amounts paid under the seven estimates, or approximately $92,000. If we *614treat the seventh estimate as not having been paid to Atkinson and as through used by the county in the completion of the contract, then, by deducting said sum of $7,242 from $92,000, we would find the total cost to the county for the erection and completion of the courthouse to be approximately $84,758. The original contract price was $74,990. The evidence tended to show that by agreed additions and changes the contract price was increased to $76,450. The said sum. of $84,758 being far in excess of either of those sums, there were at the completion of the building no funds left to which the claims of the lien claimants could attach. Therefore under the authority of the Sioux Falls case the respondents, as lien claimants, had no causes of action against the county.
There are certain other contentions applicable to one or more of the claims; but their consideration becomes unnecessary, in view of the disposition which we have made of the questions common to all of the appeals.
The judgments and orders appealed from are reversed, and the causes are remanded for further proceedings in harmony with the views herein expressed.