— This action in assumpsit has been brought by the plaintiff against the defendant to recover $4047.73, with interest from Sept. 10, 1928, being a balance alleged to be due by the defendant to the plaintiff on account of the construction, by Earl E. Shaffer, a contractor, for the Woodlawn Land Company of several houses in the Borough of Aliquippa, in the County of Beaver and State of Pennsylvania. These houses were constructed under several articles of agreement marked exhibits “A,” “B” and “C.” These agreements are all the same except with reference to the kind of building that is to be constructed, etc. They are all what are ordinarily known as “no lien contracts,” and, as required by the acts of assembly, were properly recorded in the Prothonotary’s Office of Beaver County. The 18th paragraph of all of these contracts contained the stipulation under which neither the contractor nor any one else was to file any lien against the premises for either work done or material furnished; and also contained this stipulation:
“And that said construction work, structure or structures shall be finished and delivered to the ‘Company’ free, clear and discharged from all liens, *570incumbrances and charges whatsoever, and without any liability on the part of the ‘Company’ other than the agreed liability for the amount, if any, due in accordance with the terms of this contract.”
They provided for the usual supervision of the work by the architect, and in the 33rd paragraph of the contract is contained the stipulation out of which arose this action. This paragraph provided as follows:
“It is further agreed that the final payment for the work done under this contract shall not be made by the ‘Company’ to the ‘Contractor’ until the ‘Company’ shall have received proof that all claims for materials and labor have been paid and the ‘Contractor’ shall have furnished to the ‘Company’ a release, under seal, releasing and discharging the ‘Company’ from any and all claims, damages or expenses growing in any manner out of this contract.”
The statement of claim sets forth, among other things, that the buildings provided for in these contracts were fully completed before Sept. 10, 1928, as required by the plans and specifications accompanying each of said contracts; that the said buildings had been finished and delivered to the defendant free, clear and discharged of all liens, encumbrances and charges whatsoever and without any liability on the part of the defendant other than the agreed liability for the payment of the amounts mentioned in said contracts; that the defendant still owed the plaintiff on account of said contracts the sum of $4047.73; that the plaintiff was ready to furnish and had tendered to the defendant a release, under seal, releasing and discharging the defendant from any and all claims, damages or expenses growing in any manner out of said contracts, or any of them; that defendant had refused to pay to the plaintiff the said balance due on account of the completion of said contracts.
After this statement of claim was filed and served the defendant filed an affidavit of defense, in which it admitted the making of the said contracts, the completion of the buildings provided for therein according to the plans and specifications, and admitting that there would be due to the plaintiff on account of said contracts the sum of $4047.73, if the plaintiff had fully complied with all of the terms and conditions of said contracts. The affidavit of defense, however, allegés that the plaintiff has failed to furnish the defendant proof that all claims for materials and labor have been paid by the said contractor and that the contractor had not furnished to the “Company” a release, under seal, releasing and discharging the “Company” from any and all claims, damages or expenses growing in any manner out of this contract; and that as a matter of fact a number of persons who furnished material and labor to the contractor in the completion of said contracts had not been paid; that there is due from the said Earl E. Shaffer, as contractor, to sub-contractors on said buildings the sum of $5903.38, and attached to the affidavit of defense is an itemized statement of the amouhts due and unpaid to the several subcontractors on said buildings. In the affidavit of defense it is averred by the defendant that it holds the balance due the said Earl E. Shaffer, to wit, $4047.73, in its hands as trustee for the sub-contractors or until evidence is produced to the defendant that payment has been made to the said sub-contractors by the said Earl E. Shaffer; and the Woodlawn Land Company also avers that it makes no personal claim upon the balance of $4047.73 remaining in its hands on account of the jobs mentioned in said contracts, stating that it desires to make payment to the party or parties entitled thereto pursuant to paragraph 33 of said contracts when its provisions have been complied with by the contractor.
A motion has been made by the plaintiff for judgment against the defendant for want of a sufficient affidavit of defense, it being contended on the part *571of the plaintiff that paragraph 33 of the contracts sued on does not have to be complied with by Earl E. Shaffer before he is entitled to recover the balance due under the terms of said contracts; that the fact that the defendant has not been given proof that all claims for material and labor have been paid was not of the essence of the contract; that the defendant has not been damaged through the non-compliance therewith by Earl E. Shaffer; that paragraph 33 of said contracts did not bind the defendant to pay for any of said materials or labor in case of default by the contractor in such payments; and that the persons furnishing the labor and material to the contractor are not privies to said contract and have no rights thereunder by virtue of paragraph 33 in each of said contracts; and that even though the plaintiff has not complied with the terms and conditions of paragraph 33 of the contract by furnishing proof that all claims for materials and labor have been paid, and even though it be true that there is due from the contractor to sub-contractors more than the balance in the hands of the Woodlawn Land Company, still the plaintiff is entitled to recover, since he has completed the work of constructing the buildings mentioned in said contracts in accordance with the terms and conditions thereof.
The main question to be determined by the court in this case is whether the plaintiff can recover without showing compliance with the provisions of paragraph 33 in these contracts.
The general rule is that a contractor who has agreed to do a certain piece of work in a certain manner cannot recover for his work unless he first shows that he has fully complied with all the terms of the contract, so fas as he is concerned, and that if he fails to comply with the conditions contained in the contract he cannot recover anything for his work. This general rule is set forth in 2 Williston on Contracts, § 675, as follows:
“As a general rule, conditions which are either expressed or implied in fact must be exactly fulfilled or no liability can arise on the promise which such conditions qualify. The reason for this is obvious. The promisor can only be held liable according to the terms of the promise which he makes. If he promises five dollars, he cannot be made to pay $5.01. For the same reason, if he makes a promise to do an act on condition that he receives $5.01, he cannot be required to perform on being paid $5.00. The condition is part of his promise qualifying and limiting it, and his promise as matter of plain fact is not broken until the condition has happened or been performed. Thus, where a promisor was given the option of canceling a charter party ‘if the steamer does not arrive at port of loading and be ready to load on or before midnight of the 10th of October,’ he was held entitled to cancel the charter, though the vessel arrived at 11 P. M., as it was not ready for loading until the following morning. Similarly insurance policies, building contracts, contracts of sale and other contracts, frequently contain express conditions which must be exactly performed in order to create liability on the contract; and the fact that non-performance of the condition or incomplete performance of it has caused no injury to the promisor is immaterial.”
And the same general principle is set forth in 13 Corpus Juris, 627, § 693, as follows:
“The general rule is that the parties to a contract are bound to perform it according to its terms where they are sui juris, the contract violates no rule of law or public policy and no fraud or imposition has been practiced, particularly when it has been executed by the other party, although it may be difficult to determine the rights of the parties on a breach, or although the contract operates harshly or unjustly on one of the parties. Although a con*572tract may contain some provisions which are so harsh and inequitable that they will not be enforced in equity, it has been held that equity will not on that account refuse to enforce its valid provisions.”
And the same principle has been adopted in this State and followed in many cases since Martin v. Schoenberger, 8 W. & S. 367, where Burnside, J., in delivering the opinion of the court, among other things, said (page 368):
“On the other hand, it was contended he was bound to aver and prove performance, and if he failed in that, he could not recover; and so has the law ever been held in Pennsylvania. Questions of this kind are of frequent occurrence and of great practical importance.- To permit a man to recover for part performance of an entire contract, or to permit him to recover on his agreement where he has failed to perform, would tend to demoralize the whole country. If the law were so, a man would just perform as much of his contract as would suit his convenience or cupidity; all faith and fair dealing would be at an end, and all confidence between man and man would be destroyed. The law is settled in Harris v. Liggett, 1 W. & S. 301, that he who has performed a special agreement to do a particular thing may recover the stipulated price of it by an action of indebitatus assumpsit, and use the agreement as evidence of the amount of compensation due. But if there be but part performance by the plaintiff of his part of the contract, he cannot recover. So in Shaw v. Turnpike Co., 2 P. & W. 454; 3 Ibid., 445, where a contract is entire, before any recovery can be had of the consideration money, the plaintiff must prove that he has performed or is ready to perform his part of the contract, or that the performance was prevented by the defendant. The judge properly held to the written contract, and he instructed the jury, as he ought to have done, that if they found the plaintiff had violated his engagements, he could not recover.”
This principle of the law, of course, has been modified in certain cases under certain conditions for the purpose of securing an equitable adjustment between the parties, and it has been especially modified in the case of building contracts, where the rule as to substantial performance has been followed by our courts for many years, and this rule is quite well stated in 9 Corpus Juris, 739, § 78, as follows:
“4. Substantial Performance — a. In General. The hardship of the rule requiring strict performance in order to permit recovery on a contract generally, when applied to a builder who has undesignedly violated his contract, and the inequitable advantage that it gives to an owner who receives and retains the benefit of the builder’s labor and materials, have led to its qualification; and it is generally held that, where the compensation is due only on the performance of the contract, a literal and strict performance is not required, and if the builder, acting in good faith and intending and attempting to perform his contract, does so, he may recover the contract price, notwithstanding slight and trivial defects or deviations in performance, for which compensation may be made, in all its material and substantial particulars, by an allowance to the owner; but the owner is entitled to an allowance for the damages he may suffer by reason of the failure to perform strictly, such as the cost or expense of putting the structure or work in the condition called for by the contract. The right of the builder to recover, however, does not apply where he performs the contract in a careless and negligent manner, and he must have attempted in good faith to perform.”
This modification, however, of the rule with regard to contractors has arisen from the very necessity of the ease and for the purpose of doing justice between the parties, and for no other reason. When a building is constructed *573by a contractor, there are many details contained in the plans and very many provisions contained in the specifications which have to be followed by the contractor, and when the building is finally completed or finished, it has to remain, if it is to be used at all, in the place where it has been originally constructed, and under these circumstances it would be an unconscionable thing to allow one who has received the benefits of another person’s labor and material to enjoy the fruits thereof and refuse to pay anything to the contractor for what he has done. Therefore, there has arisen the rule that where a contractor has made an honest effort to complete a building according to the plans and specifications, but unintentionally has failed of complete performance in some minor particular, he is, nevertheless, entitled to his pay, subject to a deduction for incomplete or defective work. We can, however, find no case which allows a contractor who has entered into an agreement to do a certain thing in a certain way, as the contractor did in this case, and then simply neglected or refused or been unable to comply with his contract on account of what he himself has done, to brush aside the terms and conditions of the contract and make the defendant pay in disregard of the terms of the original contract.
The stipulation contained in paragraph 33 of the contract is one which both Earl E. Shaffer and the defendant had a right to insert in the contract; it is in no way against public policy nor immoral. As a matter of fact, it is a provision which, while it does not particularly benefit the defendant, is for the benefit of those who furnish labor and material upon the buildings constructed for the defendant, for which the defendant might naturally feel morally bound to pay. The defendant evidently did not desire to have, in the buildings which it was constructing, any labor or material which had not been paid for, and, therefore, it had a perfect right to stipulate that the contractor should not receive final payment for the work until he should furnish proof to the owner that all claims for material and labor had been paid.
We can see no reason why the defendant is not entitled to insist on these claims being paid before the contractor is paid, and certainly the contractor or his representative, the trustee in bankruptcy, has not, under the terms of the contract, any moral right to the balance in the hands of the defendant until he settles the claims for labor and material.
Furthermore, as a matter of justice and right, we can see no reason why the balance in the hands of the defendant due on account of the construction of these buildings should not go to the sub-contractors who furnished labor and material in the construction of these houses instead of going into the hands of the trustee in bankruptcy to be distributed to the general creditors of Earl E. Shaffer; and it seems to us that the sub-contractors themselves have some rights and ought to be protected in the appropriation of this fund, for, while they furnished the material and labor under an agreement which was a no-lien contract, and while they knew that they could file no lien for anything they did toward the construction of these houses, they also knew that, in accordance with the same contract, the contractor himself could receive no final payment until he had made payment for all of the labor and materials which went into the construction of the houses mentioned in the said contracts, and probably relied on this provision in the contract to secure payment of their claims, and they are entitled to such protection as we can give them.
If the fund in the possession of the defendant goes into the hands of the trustee in bankruptcy, then the sub-contractors lose the benefit which they had under the written agreement between the defendant and Earl E. Shaffer, *574and this provision of the contract is brushed aside without any benefit to any person who is directly interested therein. Earl E. Shaffer is not benefited, because he is in bankruptcy, and whatever goes into the hands of the trustee goes to his general creditors. The defendant is not benefited in any way and neither are the sub-contractors, who would simply come in as general creditors against the trustee in bankruptcy.
Therefore, so far as we can see, there is no necessity which would justify the court in setting aside the provisions of paragraph 33 of the contracts between the defendant and Earl E. Shaffer, and there is nothing in justice or in equity which would require this to be done. As a matter of fact, there is greater equity in refusing to allow the plaintiff to recover and in permitting the defendant to distribute the balance in its hands to those who furnished labor and material in the construction of defendant’s houses and to whom the balance in the hands of the defendant justly belongs.
The only question which caused us to hesitate to refuse to allow the plaintiff to recover until he had shown compliance -with paragraph 33 of the contract was the fact that perhaps the defendant might be able to hold this balance in its hands and refuse to settle for the sub-contractors’ claims, but we are satisfied, after carefully examining the law, that, in view of the statements contained in the affidavit of defense, the defendant holds the balance of said money in its hands as trustee for the sub-contractors and that the defendant makes no personal claim upon the balance of $4047.73 remaining in its hands, and that it desires to make payment to the party or parties entitled thereto pursuant to paragraph 33 of the contracts sued on; that if the trustee in bankruptcy is unable to recover in this case, and the balance of $4047.73 is permitted to remain in the hands of the defendant, the sub-contractors themselves may then proceed against the Woodlawn Land Company, if necessary, and compel it to-pay the sub-contractors their pro rata share of this balance.
Generally, of course, it'is true that one who is not a party to a contract cannot sue upon the contract, and where the action is covenant, this rule still holds good. Nevertheless, there are many exceptions which have been made by the courts of this Commonwealth to this general principle, and they are well stated by Mr. Justice Simpson in the case of Tasin v. Bastress, 284 Pa. 47, 54, as follows:
“If the reason given by the court below for refusing a recovery by plaintiffs in their own names furnished the conclusive test of their right in that regard, then not only was Tasin v. Bastress, supra, improperly decided, but so, likewise, were all our other cases in which the beneficiary was allowed to sue in his own' name. True, in most of them it was assumed or the fact was that a fund was left in the hands of the particular defendant to enable him to pay the obligations for which he thus became liable; but this did not make the plaintiffs in those eases other than strangers to both the contract and the consideration moving to the defendants. Indeed, if the conclusion of the court below is correct, it would be difficult to find cases in which the beneficiary would be allowed to sue, for he is always a stranger to the contract, and if he furnished the consideration moving to the promisor, then the promise may well be said to have been made to the promisee, as agent of the beneficiary, thus, in legal effect, being made to the beneficiary himself: Hubbert v. Borden, 6 Wh. 79.
“The general question at issue has long been the cause of many conflicting decisions, and probably will continue to be so until it is settled, if it can be, by legislation. Quite generally, the subject-matter has been divided into two *575classes, (1) where the beneficiary is a donee, the promisee being under no legal liability to him; and (2) where the beneficiary is a creditor of the promisee, in which case the fulfillment of the promise would relieve the promisee of his obligation to pay the beneficiary. In some courts of last resort, different rules are applied in the two classes of cases, but there are at the present time only a few jurisdictions which hold that the donee beneficiary cannot sue in his own name: Corbin’s American Edition of Anson on Contracts, page 339; 1 Williston on Contracts, § 368. The reason for this conclusion rests in the fact that, as the promisee would lose nothing by a breach of the contract, he could never recover more than nominal damages, and, hence, if the beneficiary could not sue, the promisor could retain the fruits of the contract without fulfilling its obligations. In view of this, it necessarily follows that where, as here, the beneficiary is the only one who can be substantially benefited by such a promise, he should be allowed to recover in some form of action (Kountz v. Holthouse, 85 Pa. 235; Hostetter v. Hollinger, 117 Pa. 606, 611; Edmundson’s Estate, 259 Pa. 429, 435; McBride v. Western Penna. Paper Co., 263 Pa. 345, 349; Depuy v. Loomis, 74 Pa. Superior Ct. 497), and, hence, in certain jurisdictions, equity will compel specific performance of it when requested by the beneficiary so to do: 1 Williston on Contracts, §§ 358, 359; Corbin’s American Edition of Anson on Contracts, page 350. With us, equity originally had to be, and still is, administered in courts of law by actions of assumpsit, and no reason appears why it may not be in this class of cases. Indeed, it always has been.”
See, also, Blymire v. Boistle, 6 Watts, 182; Edmundson’s Estate, 259 Pa. 429, 433, where Mr. Justice Mestrezat says:
“In Howes v. Scott, 224 Pa. 7, 10, it is said : ‘At common law, no one could maintain an action upon a contract to which he was not a party. This rule is well established in this country, and it is recognized by both state and Federal courts. There are, however, exceptions to the rule which, in this State, are as well settled as the rule itself. For nearly three-quarters of a century, since the decision in Blymire v. Boistle, 6 Watts, 182, the decisions of this court have uniformly recognized and enforced the exceptions whenever the facts of a case required it.’ In Adams v. Kuehn, 119 Pa. 76, 85, Mr. Justice Williams, delivering the opinion, says: ‘Where one person enters into a contract with another to pay money to a third, or to deliver some valuable thing, and such third party is the only party interested in the payment or the delivery, he can release the promisor from performance or compel performance by suit.’ He then notes some of the exceptions to the general rule at common law that a person could not maintain an action upon a contract to which he was not a party, as follows: ‘Among the exceptions are cases where the promise to pay the debt of a third person rests upon the fact that money or property is placed in the hands of the promisor for that particular purpose. Also, where one buys out the stock of a tradesman and undertakes to take the place, fill the contracts, and pay the debts of his vendor. These cases, as well as the case of one who receives money or property on the promise to pay or deliver to a third person, are cases in which the third person, although not a party to the contract, may be fairly said to be a party to the consideration on which it rests. In good conscience, the title to the money or thing which is the consideration of the promise passes to the beneficiary, and the promisor is turned in effect into a trustee.”
It will be noticed that in the latter part of this quotation from the opinion of Judge Mestrezat he says: “In good conscience, the title to the money or thing which is the consideration of the promise passes to the beneficiary and *576the promisor is turned in effect into a trustee.” That is exactly what occurred in the present case. The defendant says that the money in its hands does not belong to it, but that it is perfectly willing to pay it to the sub-contractors to whom it is due. The same general principle is set forth in the case of Hindmarch v. Hoffman, 127 Pa. 284, 288, where Mr. Justice Sterrett quoted with approval Greenleaf on Evidence, as follows:
“In 2 Greenleaf on Evidence, 13th Ed., '§§ 102 and 120, the principle is thus stated: ‘Where the defendant is proven to have in his hands the money of plaintiff, which, ex sequo et bono, he ought to refund, the law conclusively presumes that he has promised to do so, and the jury are bound to find accordingly, and after verdict the promise is presumed to have been actually proved.’ ‘So if money of the plaintiff has in any other manner come to the defendant’s hands for which he would be chargeable in tort, the plaintiff may waive the tort and bring assumpsit on the common counts.’ ”
So, in the present case, in justice and equity, the balance which is left in the hands of the defendant belongs to the sub-contractors, and the defendant is not only under a moral obligation to pay whatever amount is in its hands to the sub-contractors, but in its affidavit of defense as filed it specifically agrees that it is ready and willing, if it is relieved in the present action, to pay to the sub-contractors whatever amount they may show to be due them as such sub-contractors, or divide the balance in its hands pro rata among all of the several sub-contractors.
The question of the assignment alleged to have been made by Earl E. Shaffer to the Beaver Falls Planing Mill Company, which is set out in the affidavit of defense, as we view the matter now, is not important, for it will be for the defendant to determine how much may be due the several sub-contractors, and if it gets into any difficulty in that respect, it may find it necessary to come into court in order to adjust the matter satisfactorily and with safety to itself; but with these matters we have nothing to do at the present time. We can decide simply whether the affidavit of defense filed is sufficient or not. In our opinion, the affidavit of defense as filed is sufficient.
Now, March 13,1929, the rule for judgment for want of a sufficient affidavit of defense is discharged.
From William F. Schutte, Beaver Falls, Pa.