#### Warren Webster & Company and another, Respondents, vs. Beaumont Hotel Company and others, Respondents, and National Surety Company and another, Appellants.

*September 19*

October *29, 1912.*

*Building contracts: Bond of contractor: Liability of surety: Liens of subcontractors: Foreclosure: Action governed by general equitable rules: Statutes: Remedies: Parties: Pleading: Joinder of causes of action: Oross-complaint: Complete determination of rights and liabilities: Right of trial by fury.*

1. Where a building contractor gave a bond with, surety, conditioned that be would duly perform tbe contract and “pay and discharge all indebtedness that may be incurred in carrying out and completing said ■ contract” and save tbe owner and building “free and harmless from all mechanics’ liens and claims of liens, or other claim or expenses by reason thereof,” these stipulations evinced a purpose and intent that the surety should secure payment for the material and labor furnished by the contractor, including that procured from third persons; and the latter were entitled to the benefit of such indemnity and could enforce their rights in all respects as if they had been parties to the contract and bond.

2. In such case a subcontractor is entitled to a lien upon the building and also to enforce, by action on the bond, the liability of the surety for payment of his claim.

3. Actions for the enforcement of mechanics’ liens are equitable in character, and the procedure therein and the relief to be granted are governed by the general rules of practice in courts *2of equity, except as modified by statute, and are not restricted or limited to tbe statutory regulations expressly provided.

4. Tbe rights of tbe parties in sucb actions are to be enforced according to equitable remedies and tbe provisions of tbe statutes on tbe subject, whether they are plaintiffs or defendants.

5. Under tbe equitable rule as to parties, declared by sec. 2603,, Stats. (1898), sureties upon tbe bonds of separate contractors, wbicb are conditioned for tbe payment of all bills for materials and labor contracted to be furnished by tbeir principals, may properly be joined as parties defendant, together with the-owner and sucb principals and other lien claimants, in an action by subcontractors to enforce a lien upon tbe premises improved.

6. In sucb action tbe primary right sought to be enforced is the-right to subject tbe property to tbe payment of tbe lienors’ claims, and tbe liability of tbe sureties to pay them is a subject germane to tbe primary purpose of tbe action and may be determined and enforced therein.

7. Under sec. 2666a, Stats. (1898), tbe owner may properly, by cross-complaint in sucb action, set up tbe liability of tbe principal contractors and tbe sureties upon tbeir respective bonds,, they being codefendants in tbe action, and demand that they be required to pay tbe amounts due on sucb bonds into court, thereby relieving tbe premises to that extent from tbe liens, claimed by tbe other parties to tbe action.

8. Tbe fact that one contractor and bis surety have no interest in tbe liabilities arising out of tbe contract and bond of another contractor on tbe same building, where all are made parties to. a single lien action, does not create a misjoinder of parties or of causes of action.

9. In lien foreclosure suits tbe provisions of see. 2883, Stats. (1898), giving tbe circuit court power “to determine tbe ultimate rights of the parties on each side, as between themselves, either on cross-complaint or equivalent pleadings or otherwise,” and to grant to a defendant “any affirmative relief to wbicb be may be entitled,” are peculiarly applicable; and tbe liabilities of sureties upon contractors’ bonds are sufficiently connected with tbe subject of tbe action to authorize tbe court to make a complete and final determination of tbe rights and liabilities of all parties, including a claim of tbe owner against tbe obligors upon one of sucb bonds for damages for nonperformance or for defective performance of tbe contract.

10.It is not a valid objection to tbe exercise of sucb jurisdiction that tbe parties are thereby deprived of tbe right to have tbe issues, tried by a jury.

*3Appeals from orders of tbe circuit court for Brown county S. D. BAstiNgs, Circuit Judge.

*Affirmed.*

Tbe complaint in tbis action alleges tbat tbe plaintiff *Warren Webster & Company,*as a subcontractor of Martin & Wigman, bas a lien for labor and materials used in tbe construction of tbe Beaumont hotel, and tbat tbe plaintiff *Krueger,*as a subcontractor of tbe *Kirlcman Construction Company,*bas a similar lien upon tbe same property. Tbe various statutory requirements for tbe establishment of liens are alleged.

It appears that on October 4, 1909, Martin & Wigman entered into a contract with tbe *Beaumont Hotel Company*to install in tbe Beaumont hotel at Green Bay, Wisconsin, tbe Webster system of steam circulation, and on December 23, 1909, a bond was executed by Martin & Wigman and *J. H.*M„ *Wigman*as surety with tbe hotel company, conditioned tbat if tbe contractors should fully perform all tbe conditions of tbe contract with tbe hotel company, and “duly and promptly pay and discharge all indebtedness tbat may be incurred in carrying out and completing said contract, and save said building and tbe *Beaumont Hotel Company*free and harmless from all mechanics’ liens and claims of liens, or other-claim or expenses by reason thereof,” then tbe obligation w-as to be void. On June 9, 1910, *Warren Webster & Company*contracted with Martin & Wigman to install tbe Webster system of steam circulation in tbe hotel.

In behalf of tbe plaintiff *H. W. Krueger*tbe complaint alleges tbat on November 1, 1909, the *Kirlcman Construction Company*entered into a contract with tbe hotel company to furnish tbe materials and to perform tbe work in tbe erection, construction, and rebuilding of tbe Beaumont hotel, except as such work and materials were covered by tbe contract between tbe hotel company and Martin & Wigman. On tbe same day tbe construction company and tbe *National Surety Company*as surety executed a bond in favor of tbe hotel com*4pany containing tbe same conditions as the bond previously executed by Martin & Wigman and *J. H. M. Wigman*with the hotel company. The plaintiff *Krueger*furnished materials and performed labor in the construction of the hotel under a contract with the *Kirkman Construction Company.*

The complaint also alleges that on or about September 1, 1909, the hotel company executed a trust deed or mortgage to *W. P. Wagner*as trustee. It is alleged that the execution and delivery of this trust deed was subsequent to the commencement of the work of reconstruction, remodeling, and rebuilding of the hotel, and that the trustee had notice that the work of rebuilding had commenced when the trust deed was executed.

The complaint also sets out the interests and claims for liens of other subcontractors, in so far as they had been filed. The plaintiffs ask that the demands of all persons who have filed liens upon the premises be ascertained and that the interest of the hotel company at the time of the commencement of the work and of the furnishing of materials, and of any person claiming under such interest, may be sold to satisfy the liens and costs of the action, and that the plaintiff *Krueger*have judgment in case of a deficiency against the defendants the *Kirkman Construction Company*and the *National Surety Company,*and the plaintiff *Warren Webster & Company*have a deficiency judgment against *A. B. Martin*and *J. B. Wig-man*of the firm of Martin & Wigman, and against *J. li. M.*Wigman> the surety on their bond to the hotel company.

The answer of the hotel company admits that the plaintiff *Warren Webster & Company*furnished material and performed labor under its contract with Martin & Wigman, but alleges that it was obliged to purchase some material under its contract with Martin & Wigman. It also alleges that Martin & Wigman agreed to take $2,000 of its bonds in partial payment of their contract and that the plaintiff agreed to take $1,000' of the hotel company bonds from Martin & Wig-*5man. It is alleged that it is ready to deliver the bonds to the plaintiff, but that the plaintiff is unwilling to take them.

As to the cause of action alleged by *H. W. Krueger,*the answer of the hotel company admits the allegations made separately in his behalf. It is alleged that the trust deed to *W. P. Wagner*was given and recorded prior to the commencement of any work or the furnishing of any material under the *Kirhman Construction Company*or the Martin & Wigman contracts, and that these contractors and the subcontractors under them had notice thereof.

The cross-complaint of the hotel company alleges the contract with the *Kirhman Construction Company*for the construction of the hotel and the execution of the bond by the *National Surety Company*to secure the execution of the contract. It is alleged that before completion of the contract the work was abandoned by the *Kirhman Construction Company*and that in accordance with the terms of the contract the building was completed by the hotel company. It is alleged that after the abandonment it cost the hotel company $11,105.35 to complete the work and furnish the materials under the contract; that damages for defective work and irremediable defective material and for liquidated damages were sustained by the hotel company in the further sum of $14,257.20; and that approximately $10,000' was due subcontractors from the *Kirhman Construction Company*at the time the contract was abandoned, that this amount is still owing, and that mechanics’ liens therefor, which the *Kirh-man Construction Company*and the *National Surety Comr pany*are obligated to pay, have been filed against the property of the hotel company; and it is alleged that of the sum of $70,000 to be paid the *Kirhman Construction Company*for construction and materials all has been paid except $4,912.73 in cash and $12,000 in hotel company bonds. The hotel company demands judgment that *Warren Webster & Company*Ibe required under their contract to accept hotel company *6bonds in settlement of tbeir claim; that the claims for liens ■of the various subcontractors under the *Kirhman Construction Company*may be ascertained and determined; that the *Kirhman Construction Company*and the *National Surety •Company*be adjudged primarily liable therefor and be required to pay the same into court; that the hotel company have judgment for $21,449.82 and costs of the action against *the Kirhman Construction Company*and *the National Surety Company;*and that upon payment of these amounts the *Kirh-man Construction Company*and the *National Surety Company*be entitled to the $12,000 hotel company bonds.

The answer and cross-complaint of the trustee for the hotel company is substantially the same as the answer and cross-complaint of the *Beaumont Hotel Company.*He asks that the trust deed be declared and held a prior and superior lien to those of the subcontractors, that the principals and sureties on the bonds for construction be ordered to pay the liens of the subcontractors, and that the hotel property be liable to the liens of the subcontractors and be sold and the proceeds of the sale be applied to discharge the liens only in the event and to the extent that such subcontractors be not paid by the principals and the sureties on the bonds.

The answers and cross-complaints of those of the defendant lienors who answered allege in substance that they were subcontractors and as such furnished materials and performed labor in the construction of the hotel building under the contracts, that they have filed claims for liens for the amount of their claims, that the principal contractors have failed to pay them, and that the bondsmen are liable for the amounts of their claims; and they ask that the rights of all persons having liens on the premises may be ascertained and determined, whether they be plaintiffs or defendants, that the premises subject to the liens be sold to satisfy the liens so ascertained and the costs, and in case of a deficiency that they have personal judgment against the parties liable on the demands for which the liens are claimed.

*7The *National Swety Company*demurred to the complaint of the plaintiffs on the grounds that several causes of action had been improperly united, that the complaint did not state .a cause of action against it, that no cause of action in favor of *H. W. Krueger*was stated against it, that the complaint did not state facts sufficient to constitute a cause of action against it and in favor of the plaintiff *Warren Webster & Company,*and in that *Warren Webster & Company*was made .a party plaintiff and did not state .a cause of action against it, that there was a misjoinder of parties in that subcontractor lien claimants were made parties defendant with it, and that the court had no jurisdiction because the action is one in equity for the foreclosure of mechanics’ liens and in such an .action the court had no jurisdiction of a cause of action at law against the defendant.

The *National Surety Company*demurred to the cross-complaints of the defendant subcontractor lien claimants on the .grounds that such cross-complaints did not state facts sufficient to constitute cross-complaints against it, that the court had no jurisdiction because the action was one in equity for the foreclosure of mechanics’ liens and the cross-complaints stated causes of action at law, that the cross-complaints do not state facts sufficient to constitute causes of action against it, that the causes of action stated are not pleadable as cross-complaints in the action, that there was a defect of parties in that the plaintiff *Warren Webster '& Company,*making no claim against it, was improperly joined as a party plaintiff against it, that *A. M. Duncan,*trustee in bankruptcy for Martin & Wigman, not claiming to have a cause of action against it and not being liable with it, was improperly joined as a party to the action, and that the cross-complaints state no cause of action against it, in that the cause of action alleged does not affect or involve the contract, transaction, or property which is the subject of the action and is not pleadable in or as a cross-complaint.

The *National Surety Company*and the *Kirhman Construe**8*tion Company*each, demurred to tbe cross-complaint of tbe *Beaumont Hotel Company*on tbe grounds that, tbe cause of' action alleged against them in tbe cross-complaint being an action at law and tbe complaint being an action in equity for tbe foreclosure of mechanics’ liens, tbe court bad no jurisdiction of tbe'cause of action alleged in tbe cross-complaint, that tbe cause of action stated in tbe cross-complaint was not pleadable in tbe action, that there was a defect of parties in that tbe plaintiff *Warren Webster & Company,*alleging no cause of action against either of them, was improperly joined as a party plaintiff in tbe complaint and in tbe cross-complaint, that tbe trustee in bankruptcy for Martin & Wigman, alleging no cause of action against either of them and not being liable with either of them, was improperly joined in tbe cross-complaint as a party to tbe action, that tbe facts alleged as a cause of action in tbe cross-complaint do not constitute a cross-complaint against them because it does not involve or affect tbe contract, transaction, or property which is tbe subject matter of-the action and is not pleadable as a cross-complaint or in tbe cross-complaint, and that tbe cause of action alleged does not constitute a cause of action, and because several causes of action have been improperly united.

All of tbe demurrers were overruled. Tbe appeals are from tbe orders overruling tbe demurrers.

Eor tbe appellants there was a brief by *Thompsons, Pinlc-erton & Jaclcson,*and oral argument by *J. C. Thompson.*

Eor tbe plaintiff respondents tbe cause was submitted on tbe brief of *Cady, Strehlow & Joseph.*

Eor tbe respondents *Beaumont Hotel Company*and *W. P. Wagner,*trustee, there was a brief by *Sol. P. Huntington,*attorney; a separate brief for tbe *Beaumont Hotel Company*by *George G. ■Greene;*and oral argument by *Mr. Huntington.*

For tbe several respondent lien claimants there was a brief signed by *Nath. Pereles & Sons; Shemdan, Evans & Merrill; James H. McGillan; Cady, Strehlow & Joseph; Minaban &**9*Minahan; Kittell & BwrTee;*and *Greene, Fairchild, North, Parker & McGillan;*and oral argument by *J. B. North*and *E. B. Minahan.*

Siebeckee, J.

Tbe questions raised by tbe different demurrers to tbe complaint and tbe cross-complaints of tbe *Beaumont Hotel Company*and tbe subcontractors as lienors may be treated together, because tbe same subjects are involved in tbeir consideration and decision. In natural sequence, tbe question of tbe nature and extent of tbe liability of tbe sureties under tbe bonds given by tbem to tbe principal contractors to secure performance of tbe contracts for tbe construction of tbe hotel, and the nature of tbe action for tbe enforcement and foreclosure of tbe alleged liens, should be first considered.

1. Tbe complaint alleges that to secure tbe faithful performance of tbe contract of tbe *Kirkmcm Oonstmaction Company*with tbe *Beaumont Hotel Company*to furnish tbe material and perform tbe work therein specified for .the construction of tbe hotel, tbe construction company as principal, and tbe defendant *National Surety Company*as surety, on November 1, 1909, made a bond binding themselves to pay tbe hotel company tbe sum of $35,000, conditioned that if tbe construction company should duly perform tbe contract with tbe hotel company for furnishing tbe material and performing tbe labor agreed upon, and “shall duly and promptly pay and discharge all indebtedness that may be incurred in carrying out and completing said contract, and save said building and tbe *Beaumont Hotel Company*free and harmless from all mechanics’ liens and claims of liens, or other claim or expenses by reason thereof, then this obligation shall be void, otherwise to remain in full force and effect.” Tbe bond of tbe surety, *J. H. M. Wigman,*to secure tbe performance of tbe contract of Martin & Wigman contained provisions of like effect. Confessedly, both of tbe principal contractors failed to perform tbeir contracts. This failure imposes the obliga*10tion on tbe bondsmen to “pay and discharge all indebtedness that may be incurred in carrying out and completing said contract” and to save tbe hotel property and tbe hotel company “free and harmless from all mechanics’ liens and claims of liens,-or other claim or expenses by reason thereof.” This undertaking is in no sense modified or restricted by the terms of the construction contracts of the parties, wherein the construction company agrees, in consideration of sums agreed upon, to furnish all tbe material and labor embraced in the contracts, to pay for the same, and to furnish written vouchers showing such payment or waiver of claim or lien therefor, and if through default in these conditions any liability should be incurred by the hotel company, then the sureties were to indemnify and make whole the hotel company on account thereof. These stipulations of the contracts and bonds clearly mean and evince a purpose that the parties thereby intended that the sureties should secure.payment for the material and labor furnished by the contractors. Obviously, the parties understood that in the course of affairs such an obligation would cover the material and labor secured from third parties by the contractors. Under such circumstances, third parties furnishing labor and material obtain the benefit of such indemnity, and they can enforce their rights in all respects as if they had been parties to the contracts and bonds. The rights and liabilities of the principal contractors, the sureties, and the persons furnishing material and labor within the terms of the transactions covered by the construction contracts and bonds have on several occasions recently been considered in this court and need no further amplification here. See the following cases and the cases cited therein sustaining the light of such third persons to enforce the obligation against the bondsmen: *United States G. Co. v. Gleason,*135 Wis. 539, 116 N. W. 238; *R. Connor Co. v. Ætna, Ind. Co.*136 Wis. 13, 115 N. W. 811; *Tweeddale v. Tweeddale,*116 Wis. 511, 93 N. W. 440; *Johnston v. Charles Abresch Co.*123 Wis. *11130, 101 N. W. 395. Under the facts and circumstances of the case, the subcontractors who have unpaid claims for material and labor furnished in the construction of the hotel and embraced in the provisions of the construction contracts are entitled to liens therefor on the hotel property, and they are entitled to enforce the liability of the sureties upon their bonds for payment thereof by action against the sureties.

2. It is contended by the appellants that the action for the enforcement of mechanics’, laborers’, and materialmen’s liens is a remedy provided by statute, which prescribes the rules of pleading and the procedure therein, and that the regulations on these subjects in the lien statutes exclude any intention that such actions are to be governed by the established rules in equitable proceedings other than those specifically included in the statutes. This contention is based on the provisions prescribing what claimants may be made parties to the action (sec. 3321, Stats. 1898), what allegations of fact shall make a sufficient complaint (sec. 3322, Stats. 1898), what shall be embraced in the judgment for a sale of the premises and the distribution of the proceeds, and whether there shall be personal judgments in case of a deficiency or for want of establishing a lien on the property (sec. 3324 to sec. 3326, Stats. 1898). The contention that the right to a lien being created by a statute which prescribes the procedure to enforce it shows an intention that the remedy is to be restricted and limited to the statutory regulations provided, is not sustained. The statute (sec. 3323, Stats. 1898) by express provision declares that such an action shall be deemed equitable. This negatives the implication that it is to be restricted to the statutory procedure expressly provided. The statutory regulations concerning pleading and practice in the action to enforce the lien are to be treated as regulative of those parts of the equitable proceeding and do not exclude the right to apply equitable procedure in all other respects so far as the facts and circumstances of the case may require to adjudicate upon the rights *12of all parties thereto. The remedy for foreclosing the lien is equitable in its nature and characteristics, and makes the action inherently an action in equity. The nature of the relief to be granted is such as the courts of equity award and such as can be most readily administered under their procedure. That statutory regulation of the pleading and practice in lien suits does not provide a complete code of procedure, and that equitable rules unless modified by statute are applicable, is recognized in the following cases: *Huse v. Washburn,*59 Wis. 414, 18 N. W. 341; *Bartlett v. Clough,*94 Wis. 196, 68 N. W. 875; *Willer v. Bergenthal,*50 Wis. 474, 7 N. W. 352; *Charles Baumbach Co. v. Laube,*99 Wis. 171, 74 N. W. 96; *Charles v. Godfrey,*125 Wis. 594, 104 N. W. 814. Had the statute simply declared that the action to foreclose a lien should be deemed equitable, there could be no claim but that an equitable procedure would apply and control in all respects. There is nothing in the provisions modifying the procedure in such action which is inconsistent with the procedure in equity cases in other respects. The statutory regulation of the remedy goes no farther than to modify or confirm the rules that equity employs in similar suits and in no way abrogates their application to the varying exigencies that may arise in lien actions. From this it necessarily follows that the rights of the parties in such actions are to be enforced according to equitable remedies and the provisions of the statutes for determining the ultimate rights of the parties who have filed claims for liens against the property, whether they are plaintiffs or defendants in the action.

3. We now approach the specific grounds of demurrer. The complaint and the cross-complaints of the lienors allege in substance and form that they are subcontractors, that the principal contractors have failed to pay them in the amounts stated for materials furnished and labor performed under the construction contracts, and that they claim liens on the hotel property for these amounts and that the bondsmen are liable; *13and they ask that the rights of all persons who have filed claims for liens on the premises, whether plaintiff or defendant, be ascertained, that the premises subject to the liens be sold to satisfy the liens, with costs, and, in case of deficiency, that they have personal judgment against the parties liable on the demands for which liens are claimed. The hotel com: pany in its cross-complaint alleges the making of the construction contracts, and the bonds to secure performance thereof, the terms and conditions of these agreements, the failure of performance and that large sums are due the lienors, and that it has large claims against the principal contractors and their sureties for work done and material furnished in carrying the construction of the hotel to completion as called for by the construction contracts, and that it has a claim for damages against them for their default in not providing the material and completing the work as specified in the construction contracts. The sureties and the principal contractors contend, under their demurrers to the complaint and to the cross-complaints of the lienors and of the hotel company, that there is a defect of parties plaintiff and defendant, that several causes of action have been improperly united, and that the complaint and the cross-complaints do not state facts sufficient to constitute a cause of action.

It is provided in sec. 3321, Stats. (1898), that any such lienor may foreclose his lien by action and that all such lien-ors may join as plaintiffs, and if any of them do not so join, or refuse, they may be made defendants; also, that all persons having a subsequent mortgage, judgment, or other lien, and all subsequent purchasers of the premises, may be made defendants, and, if the action is brought by a subcontractor, then the principal contractor may be made a defendant. These provisions embrace all the persons who are parties of record in this suit except the sureties. . The question is whether they are properly before the court as parties to the action. The relations of the sureties to the principal contractors, the sub*14contractors, and the hotel company, under the terms of the construction contracts and the bonds, have heretofore been considered, and they were held liable on their bonds to the hotel company and the lienors for any claims for material and labor needed to complete the construction of the hotel pursuant to the construction contracts on account of the principal contractors’ default, hence they are vitally and adversely interested in the claims presented by the pleadings in favor of the hotel company and the lienors. Under their bonds they are primarily liable for payment of the debts and the liens for material and work. Under the equitable rule declared by sec. 2603, Stats. (1898), “Any person may he made a defendant who has or claims an interest in the controversy adverse to the plaintiff, or who is a necessary party to a complete determination or settlement of the questions involved therein.” Since the bondsmen have an interest in the controversy adverse to the plaintiffs, they are interested in not being subjected to any liability for claims of the lienors in excess of what may he found justly due them, and they are necessary parties to the litigation to determine this liability on doubtful claims should any such be presented for allowance. The sureties being thus adversely interested in the questions litigated, it is appropriate for a ..court of equity, in order to make a complete determination of all the questions involved between the parties, to require their presence so as to enable it to award judgment against them for the payment and discharge of all claims and liens according to the rights established in the action, thus saving the hotel company harmless in the matter. The court having jurisdiction of the parties, no obstacle exists to the granting of the relief demanded in the complaint and the cross-complaints, if it be so related to the subject of the action as to bring it within equitable cognizance. The primary right sought to be enforced in this action is to subject the property of the hotel company to the payment of the *15lienors’ claims accruing for tbe improvement of tbis property. Tbe enforcement thereof necessarily involves tbe establishment and determination of the amount of tbe claims justly due from tbe principal contractors for tbe construction of tbe hotel, tbe enforcement of tbe liens therefor, and tbe payment of tbe debts. Tbe liability of the sureties to pay them is therefore a subject germane to tbe primary purpose and object of tbe action. Tbis liability is properly enforceable between all parties appearing as codefendants, under tbe provisions of sec. 2656a, Stats. (1898), which declares:

> “A defendant . . . may have affirmative relief against a codefendant, or a codefendant and tbe plaintiff, or part of tbe plaintiffs, or a codéfendant and a person not a party, . . . upon bis being brought in; but in all such cases such relief must involve or in some manner affect tbe contract, transaction or property which is tbe subject matter of tbe action.”

Tbe relief here sought against tbe sureties and their principals manifestly is related to and connected with tbe cause of action of tbe complaint and tbe cross-complaints of tbe lienors, and hence it includes and affects “tbe contract, transaction or property which is tbe subject matter of tbe action.” Under tbe circumstances shown and under tbe provisions of tbe statutes, it is apparent that those who were made defendants in tbe action were properly before tbe court and that there was no misjoinder or defect of parties to tbe'action.

Tbe claim that tbe principal contractors, Martin & Wig-man, and their obligor have no interest in tbe liabilities arising out of tbe contract and tbe bond of tbe *Kirhmcm Construction Compcmy*and its obligor is not tenable, because tbe demands of all tbe parties are connected with and relate to tbe subject of enforcing liens against tbe premises of tbe hotel company and of obtaining tbe payment of tbe debts, or, as declared in sec. 2656a, Stats. (1898), they involve and affect “tbe contract, transaction or property which is tbe sub*16ject matter of tbe action.” In the case of *Gager v. Marsden,*101 Wis. 598, 77 N. W. 922, tbis court states r

> “In an equitable action many matters are often' adjudicated wbicb would form tbe subject of an independent action,, either at tbe suit of plaintiff against one or more of tbe defendants, or between different defendants, yet are properly brought before tbe court as germane to tbe subject of tbe action stated in tbe complaint.”

See, also, *Carpenter v. Christianson,*120 Wis. 558, 98 N. W. 617; *Level L. Co. v. Sivyer,*112 Wis. 442, 88 N. W. 317; *Harrigan v. Gilchrist,*121 Wis. 127, 99 N. W. 909.

4. It is strenuously asserted in behalf of all tbe demurrants tbat several alleged causes of action bave been improperly united and tbat tbe complaint and cross-complaints do. not state facts sufficient to constitute a cause of action. Tbe joinder of different causes of action for relief in favor of a party to a lien suit, or in favor of different persons who are proper parties to tbe action, is justified and proper,, as we bave heretofore seen, if tbe relief sought involves, or in some manner affects, “the contract, transaction or properly wbicb is tbe subject matter of tbe action.” The grounds upon wbicb tbe subcontractors, tbe hotel company, tbe principal contractors, and their bondsmen are found to be proper parties to tbis action for foreclosure of liens on tbe hotel property show tbat tbe relief they seek to enforce involves rights related and germane to tbe matter of enforcing the liens against tbe hotel property and securing payment of tbe amounts due under tbe construction contracts, and involves tbe determination of tbe ultimate liabilities of tbe parties between themselves, on each side of tbe controversy, pertaining to tbe transaction of tbe construction of tbe hotel. Jurisdiction of tbe parties in tbe suit for these purposes carries with it tbe right to unite in the complaint or cross-complaints tbe different grounds or causes of action for relief, to enable tbe court to ■“determine tbe ultimate rights of tbe parties on each side, as *17between themselves, either on cross-complaint or equivalent pleadings or otherwise, and may grant to the defendant any affirmative relief to which he may be entitled.” See. 2883, Stats. (1898). The scope of this power is declaratory of the broad, equitable powers courts may employ in joining parties and subjects in one suit, to determine their ultimate rights within its jurisdiction. This'power is of peculiar applicability to lien foreclosure suits under the statutory provisions heretofore referred to and considered. The appellants claim and insist, however, that the causes of action alleged by the lienors against the principal contractors and their bondsmen for relief on the bonds, and by the hotel company against the *Kirhmcm Construction Company*and its surety for relief under the construction contract and the bond, are actions at law which cannot be litigated in this equity suit. A portion of the relief demanded by the hotel company is that, if the principal contractor default in paying what is due subcontractors for material and labor, then that the surety be required to pay such claims to save the hotel company harmless from liens against its property. This the surety contracted to do, and under this obligation the hotel company may enforce this primary liability of the surety to pay the debts of its principal. This right is within the equitable principle governing this duty between the surety and the hotel company, which in turn is liable to these lienors as a surety of the surety company, that the surety company bear the obligation which is about to be cast on the hotel company, which principle was applied in the ease of *Dobie v. Fidelity & C. Co.*95 Wis. 540, 70 N. W. 482, and approved in *Momsen v. Noyes,*105 Wis. 565, 81 N. W. 860. The trial court held that the hotel company’s claim for breach of contract by the *KirTcmcm Construction Company*was not related to the primary right sought to he enforced in this lien action. Failure of the construction company to furnish the material and do the work required of it has, it is alleged, resulted in damages to the *18Hotel company and in liens against its property. Tbe rights and liabilities arising from tbe construction and surety contracts, tbe hotel property, tbe question of tbe hotel company’s claim for unpaid lien debts, and its claims for damages for breach of tbe construction contract, which claims tbe company may retain and offset against any claim of tbe principal contractor or affirmatively enforce against tbe surety if tbe principal defaults in paying them, connect these inquiries sufficiently with tbe subject of tbe litigation to empower a court of equity to adjust and settle them between tbe parties to this action. Tbe trial and determination of these issues in this action are incidental to tbe enforcement of tbe rights of tbe lien claimants against tbe hotel property, which tbe owners have a right to protect by asking that all tbe liabilities of tbe parties be adjusted and that no more be allowed *to*lien claimants than they are upon investigation entitled to, and that tbe principal contractor and bis surety be compelled to pay such debts and save tbe hotel property harmless. Tbe bond is involved in tbe suit and tbe relief therein as to lienors, and as to the hotel company for default in construction, and this sufficiently connects tbe hotel company’s claim for damages for breach of tbe construction contract with tbe subject of tbe action to authorize tbe court to retain it in order to have a complete and final determination of tbe rights and liabilities of all tbe parties in any manner interested in these contracts and tbe property. We are persuaded that this bolding is within tbe principle of tbe decision in tbe following cases, which bold that a court may “lay bold of a subject matter, however large, made up of a single primary right, and all rights germane thereto, however numerous, or several such subject matters under certain circumstances, bring all parties directly interested before tbe court, with all parties necessary to be there for their due protection, and settle tbe entire controversy by a single decree:” *Harrigan v.*Gilchrist, 121 Wis. 127, 99 N. W. 909; *Gager v.*Marsden, 101 Wis. 598, *1977 N. W. 922; *Carpenter v. Christianson,*120 Wis. 558, 98 N. W. 517; *Herman v. Felthousen,*114 Wis. 423, 90 N. W. 432; *Adkins v. Loucks,*107 Wis. 587, 83 N. W. 934; *Level L. Co. v. Sivyer,*112 Wis. 442, 88 N. W. 317; *Zinc C. Co. v. First Nat. Bank,*103 Wis. 125, 79 N. W. 229; *St. Croix T. Co. v. Joseph,*142 Wis. 55, 124 N. W. 1049.

The claim that this course deprives the demurrants of the right to have these issues tried by a jury is not sustained. Under sec. 2843, Stats. (1898), actions for the recovery of money only, or of specific real or personal property, or for divorce on the ground of adultery must be tried by a jury, ilo such case is here presented. The court properly overruled the demurrers interposed by the defendants.

*By the Gourt.*— The orders appealed from are affirmed.