#### WILLIAM I. SCHNEPP v. CURTIS A. RICHARDSON and Wife, BEATRICE W. RICHARDSON, and JOE P. FISHER.

(Filed 4 November, 1942.)

1. Laborers’ and Materialmen’s Liens §§ 3, 5a—

Tbe claim of a subcontractor or materialman supplants that of the contractor and the duty of the owner to pay is an independent and primary obligation created by statute. The owner is liable to the subcontractor only in the event he receives notice of claim prior to settlement with the contractor, and then only to the extent of the contract price still in hand. C. S., 2437; C. S., 2439-40.

2. Pleadings § 10—

The cross actions by defendant against codefendant or a third party permitted under our practice must be in reference to the claim made by the plaintiff and based upon an adjustment of that claim. Independent and irrelevant causes of action cannot be litigated by cross action.

3. Pleadings § 16—

In an action by a subcontractor against the owner of a building for work done and material furnished for improvements to the building by contract with principal contractor B., defendant by answer denied the material allegations and set up a cross action for breach of contract and damages against one F., alleging he was the principal contractor. Held: Demurrer by F. sustained on the ground of misjoinder of parties and causes.

Appeal by defendants Richardson from Ervin, Special Judge, at February Term, 1942, of Cabarrus.

Affirmed.

Civil action to enforce subcontractor’s lien.

The plaintiff alleges that J. M. Blackwelder, as principal contractor, engaged to construct a building on premises belonging to defendants; that he, the plaintiff, as subcontractor under Blackwelder, did the plumbing and furnished the material therefor; that there is now still due him the sum of $286.00; and that he duly filed with the defendant an itemized statement thereof. He seeks a judgment for the amount due and a foreclosure of the statutory lien filed.

The defendants answered denying the material allegations of the complaint and setting up a cross action against one Joe P. Fisher.

In the cross action they allege that Fisher was the contractor; that he failed and refused to complete the construction of said building according to plans and specifications, thereby breaching his contract; and that defendants, by reason thereof, suffered damages in the sum of $2,500. They also allege damages (1) for rents paid; (2) for failure to complete the contract; (3) for failure to pay for materials furnished by others; and (4) for $100 unjustly retained by Fisher. They pray that Fisher *229be made a party defendant to the end that the whole controversy may be litigated in this action.

On motion of defendants, after notice, Joe P. Fisher was made party defendant and was duly served with process. He appeared and demurred for misjoinder of parties and causes of action.

"When the cause came on for hearing the court below sustained the demurrer and entered its judgment accordingly. Defendants excepted and appealed.

Barnhardt & Galloway and B. Lee Wright for appellants.

B. T. Bost, Jr., and Hartsell <& Hartsell for appellee.

Barnhill, J.

The plaintiff, to recover, must prove: (1) his subcontract; (2) work done and labor performed in fulfillment thereof; (3) a balance due; (4) notice to the owner as required by statute prior to payment of the contract price to the principal contractor; and (5) a balance due the contractor. C. S., 2437; C. S., 2439-40. Upon such showing the law requires the owner to apply the unexpended contract price due the contractor to the payment of amounts due subcontractors and materialmen of whose claims the owner has received notice. C. S., 2439-40-41; pro rata if necessary. C. S., 2442; Construction Co. v. Winston-Salem Journal, 198 N. C., 273, 151 S. E., 631; Brown v. Ward, 221 N. C., 344; Powder Co. v. Denton, 176 N. C., 426, 97 S. E., 372; Foundry Co. v. Aluminum Co., 172 N. C., 704, 90 S. E., 923; Supply Co. v. Eastern Star Home, 163 N. C., 513, 79 S. E., 964; Clark v. Edwards, 119 N. C., 115; Mfg. Co. v. Holladay, 178 N. C., 417, 100 S. E., 597.

The claim of the subcontractor or materialman supplants that of the contractor and the duty of the owner to pay is an independent, and primary obligation created by statute. The owner is liable to the subcontractor, however, only in the event he received notice of claim prior to settlement with the principal contractor and then only to the extent of the unexpended contract price still retained by him. Price v. Gas Co., 207 N. C., 796, 178 S. E., 567.

The plaintiff has alleged that Blackwelder was the contractor under whom he worked. He must stand or fall on this allegation. Whichard v. Lipe, 221 N. C., 53. Hence, he is not affected by any controversy between defendants and Fisher. But, conceding the identity of the contractor, the same conclusion follows. . The cross action defendants seek to set up against Fisher is not germane to, founded upon or necessarily connected with the subject matter in litigation between plaintiff and defendants. Decision on the issues thus attempted to be raised is not essential to a full and complete determination of the cause of action *230alleged by plaintiff. It should not be engrafted upon Ms action and thus compel him to stand by while defendants and Fisher litigate their differences in his suit. Montgomery v. Blades, 217 N. C., 654, 9 S. E. (2d), 397, and cases cited; Wingler v. Miller, 221 N. C., 137; Burleson v. Burlesgn, 217 N. C., 336, 7 S. E. (2d), 706; Beam v. Wright, ante, 174.

The cross action by a defendant against a codefendant or a third party permitted under our practice must be in reference to the claim made by the plaintiff and based upon an adjustment of that claim. Independent and irrelevant causes of action cannot be litigated by cross action. Coulter v. Wilson, 171 N. C., 537, 88 S. E., 857; Montgomery v. Blades, supra; Wingler v. Miller, supra; Beam v. Wright, supra.

Questions in dispute among the defendants may not he litigated by cross action unless they arise out of the subject of the action as set out in the complaint and have such relation to the plaintiff’s claim as that their adjustment is necessary to a full and final determination of the cause. Hulbert v. Douglas, 94 N. C., 128; Montgomery v. Blades, supra; Wingler v. Miller, supra; Beam v. Wright, supra.

The presence of Fisher as a party is not essential to enable defendants to fully resist the claim of plaintiff. The defenses of “settlement with the contractor” and of “no debt due the contractor at the time of notice” are available to defendants on the pleadings as presently filed without the joinder of the contractor as a party defendant.

It is to be noted that the judgment entered sustains the demurrer but does not dismiss the action as to Fisher. The cross action is out but Fisher is not. He may defend on the issue as to the amount due by the owner to the contractor. Waiving the controversy as to who was the contractor, he is, perhaps, on this issue, a proper, though not a necessary, party.

We concur in the conclusion of the court below. There is a mis-joinder both of parties and of causes óf action. Shore v. Holt, 185 N. C., 312, 117 S. E., 165; Bank v. Angelo, 193 N. C., 576, 137 S. E., 705; Rose v. Warehouse Co., 182 N. C., 107, 108 S. E., 389; Taylor v. Ins. Co., 182 N. C., 120, 108 S. E., 502; Roberts v. Mfg. Co., 181 N. C., 204, 106 S. E., 654; Montgomery v. Blades, supra; Wingler v. Miller, supra; Beam v. Wright, supra.

The plaintiff does not allege that at the time he filed statutory notice of his claim with the defendants they were then indebted to the contractor. Whether this is essential we need not now decide. If plaintiff deems it advisable to amend he may still seek permission to do so.

The judgment below is

Affirmed.