The plaintiff brings this action for the purpose of removing a cloud upon his title to certain real estate. The complaint is based upon a contract, entered into between the plaintiff and the defendants, and the claim of the plaintiff is, that such contract constitutes a cloud upon the title, that the defendants are not entitled to enforce the same, and, therefore, it should be removed as an incumbrance. There does not seem to be any dispute but that the contract as it exists constitutes the same a cloud upon the title, and, therefore, the plaintiff becomes entitled to enforce its provisions. The_ execution of the contract arose out of the following facts. The plaintiff being the owner of the premises, contracted to sell the same to one Henry S. Wood for the agreed price of $165,000 to be paid by Wood’s *546assumption of a mortgage upon the premises of $90,000 and the execution to the plaintiff of a purchase-money mortgage of $15,000. No money consideration passed from Wood to the plaintiff for the purchase price of the premises.
By the terms of the contract, Wood agreed to immediately begin the construction, upon said premises, of two eight-story buildings, and plaintiff was to loan and advance to Wood as the buildings progressed $50,000, which was to be secured by a building loan mortgage. Wood was a man of no means, and became financially -embarrassed as the work proceeded. He was only able to continue the work as money was advanced by the plaintiff. The $50,000 proving insufficient for the erection of the buildings, and Wood ■having no money, the plaintiff procured to be executed by Wood a second building loan mortgage, running to the plaintiff, of $42,500. After the giving of the building loan mortgages the plaintiff conveyed the property, by deed, to Wood.
In erecting the buildings Wood entered into contracts with the defendants to furnish material and perform work, labor and services in and about the construction of the buildings, and incurred an indebtedness therefor, which furnished the consideration in part for the execution of the contract, the subject of this action.
The performance of the contract of. sale by Wood proceeded to a point where he became hopelessly involved and unable to pay the materialmen or proceed further with the construction of the buildings. Thereupon the plaintiff commenced an action for the foreclosure of the two building loan mortgages executed by Wood.. In this action all of the defendants were made parties, but some had not been served with process prior to the execution of the contract, the subject of the action.
It was the contention of the defendants at this time that certain of their claims were superior to the lien of the two mortgages and should be paid in preference thereto; that they also had a defense upon the merits,, based upon the claim that the full amount of money secured to be paid by the mortgages had not been advanced by the plaintiff to Wood, but that the plaintiff had appropriated to ■himself a very large sum of money, the proceeds of the mortgages, and that his son, with the consent of the plaintiff, had profited in an unconscionable amount in the contract which he made with Wood *547for doing the mason work upon the buildings ; that the sums secured thereby by the plaintiff and his son should be deducted from the amount of the building loan mortgages and paid to the defendants upon their several claims. Some of the materialmen, if not all, employed counsel to protect their rights in the premises.
After these claims had been advanced negotiations, were had between the parties and the counsel representing the respective interests, and such negotiations finally resulted in the making and execution of the contract, the subject of the action.
No answers were interposed by the defendants or any of them in the foreclosure action and upon the sale the premises were bid in by Jones. In the answers which have been interposed in this action it is set forth that Wood was the mere dummy of Jones, and in substance that the transaction between Jones and Wood was a scheme upon the part of Jones to defraud the material-men who should be engaged in constructing these buildings, and that pursuant thereto Jones appropriated a large part of the proceeds of the building loan mortgages, and, through the contract with his son, adverted to above, and in other matters, he fraudulently procured for himself, at the expense of these defendants, considerable sums of money, which now ought to be applied in payment of these defendants’ claims.
A perusal of the testimony discloses much in justification and support.of the claims set forth by the defendants in their answers and otherwise. It is not, however, averred in any of the answers interposed by the defendants that they were without knowledge of the existence of these fraudulent acts on the part of Jones; on the contrary, the evidence discloses the fact that the defendants did have knowledge of the act of Jones in appropriating money, and of the contract for the mason work secured by his son. It must be assumed, therefore, for all the purposes of this action, that these defendants were informed of existing conditions at the time of the negotiations, which led to the execution of the contract, the subject of the action.
Such being the fact, and as they and each of them consented and agreed that Jones should be permitted to continue the foreclosure of the mortgages for the full amount for which they stood as security, and that the defendants were to be paid the amount of their *548claims by the proceeds of a mortgage or from the proceeds of the sale of the property, subject to the amount of the mortgages, and of the amount of Jones’ advances otherwise made upon the property, they must be held to be concluded by such agreement, and cannot now attack the transaction between Jones and Wood, or have the settlement relating thereto disturbed.
The effect of the execution of the agreement was to substitute an independent executory contract for the protection of the defendants and to settle the matters in difference, and as such it became binding upon the parties thereto and resort can only be had to it in the enforcement of the respective rights and liabilities of the parties. (Morehouse v. Second Nat. Bank of Oswego, 98 N. Y. 503; Nassoiy v. Tomlinson, 148 id. 326.)
This brings us to a consideration of the construction to be placed upon the contract. It recited the mortgages given by Wood and held by Jones, and provides that Jones should press the foreclosure actions to judgment and sale, and bid in the property if upon such sale an amount to pay the judgment, interest and costs was not bid, and take title thereto and would immediately thereafter execute and deliver-a good and proper deed of the same to Melvin G. Palliser “ upqn the understanding and agreement that before the delivery of said deed a bond and mortgage shall have been negotiated upon the said premises when completed for the sum of $250,000, which sum, less the expenses of procuring the same, shall be paid over and applied to pay off the liens upon said property prior to those of said Jones, and then upon the judgments and mortgages of the said Jones, as far as the same will go, and that he will, if necessary, as hereinafter set otit, accept a second mortgage upon and against said premises for the difference coming to him, payable on or before six months after date, with interest.”
The 2d clause of the contract appoints Melvin G. Palliser as trasteé of the defendants and defines what he shall do in these words : “ To act as their trustee in the inception from said.Louis M. Jones of a deed of the premises hereinafter described, to take possession of the buildings erected and to see that the same are immediately pushed- toward a completion and to procure permanent mortgages upon and against the same, to ■ pay ' off the: first, second, third and fourth mortgages thereon, to rent the said buildings and *549to collect the rents of the same, to contract for and to sell the same and to do any and all other act or acts in and about the premises necessary for our protection and for the completion of the buildings, and the renting, mortgaging and sale of the same.”
By the 4th clause of the agreement, Palliser was to negotiate a permanent first mortgage upon the buildings of $250,000 at four and one-half per cent, or a larger sum if practicable, and if possible to negotiate a second mortgage for $40,000, and out of the proceeds to pay the taxes, the mortgage to the United States Trust Company and interest, the several mortgages of Jones in their order of priority, with interest, and the costs of the foreclosure so far as the same might go; that if it was impracticable to secure the second mortgage of $40,000 he was to execute a mortgage for the deficiency due to Jones, and for any sums which Jones might thereafter advance to carry out the intention of the agreement. . Should the mortgage of $40,000 be obtained, the proceeds thereof, after the costs, to be divided jiro rata among the respective creditors without reference to priority of liens.
By the 10th clause the trustee was authorized to sell the premises for the best price obtainable, but not less than a sum sufficient to pay the claims of the creditors, parties to the agreement, in full, and if for a larger sum then certain other persons to be paid specified sums. The defendants upon their part promised and agreed to furnish materials and complete the buildings. It is conceded that they fulfilled the terms of the contract in this respect. It is apparent from the 1st and 2d clauses of the contract that the exe-' cution and delivery of the deed by Jones to Palliser was made dependent upon his procurement of a mortgage for $250,000. Such is the express statement in the 1st clause of the agreement, and the possession of the property provided for in the 2d clause by Palliser, as trustee, was dependent upon the fulfillment of the obligation assumed in the 1st clause. The language of the 2d clause is “ to act as their trustee in the reception from said Louis M. Jones of a deed,” then to take possession, etc. There was, therefore, no right either to the deed or to the possession of the premises by Palliser unless he procured the $250,000 mortgage. Until he fulfilled in this respect he was not entitled to exercise any act of dominion ' or control over the premises, except to see that they were com*550pleted. '• He was not authorized to rent or sell or do any other act in control of the premises until he fulfilled his contract by procuring a mortgage, when he would be immediately entitled to a deed and the possession and control of the same. It is quite true that he was entitled to a reasonable time after the completion of the building in which to perform his contract in this respect, but until he did perform it he was not entitled to the deed or the possession. In this connection Jones was not required to do anything. He had not contracted that the buildings before or after completion should be in any particular condition for rent or otherwise. He con-, traeted to bid in the premises at the sale, unless sufficient was bid by other parties to pay the mortgages and costs. He did not contract to do anything else, except to deliver the deed and possession when Palliser procured the mortgage. Consequently Jones was guilty of no breach of his contract in failing to execute and deliver the deed to Palliser, or to allow the latter to take charge of the building and rent or sell the same. Both acts were conditioned upon Palliser’s act in procuring the mortgage. Undoubtedly Jones could not interfere so as to prevent Palliser from the fulfillment of the contract upon his part, and if he did he would then be guilty of a. breach of its terms, but his mere refusal to deliver the deed, or to permit Palliser to take possession of the buildings or to put the same into condition more attractive for rent, did not operate as breaches of the contract, because no obligation was imposed thereby that he should do those things. It is conceded that Palliser did not procure a mortgage for $250,000, and that he was unable to obtain one for that amount, or that he ever obtained such mortgage, or could obtain it. ■ The claim that he was excused' therefrom because opportunity was not given him to rent the premises after completion and thus furnish a basis for the loan of $250,000, was unavailing, as Jones had not agreed to create such a condition or permit Palliser to create it. When Palliser found himself unable to obtain the loan of $250,000, he negotiated by himself and his attorney with the plaintiff to secure a modification of the contract in this respect, which would permit of a loan to be obtained for $200,000 instead of $250,000. It is clear that Jones was not obliged to accept this modification, nor does it appear that he did so, neither did he object, but stated that he would see .what he could do. The most favorable-*551light which the defendants can claim, is that he stated that he would look after it, and to leave the matter in his hands, and it was so left by the consent of Palliser. The latter says that he took no steps after January to secure the loan, and that he knew that Jones was trying to obtain it, and that he did not object. The matter, therefore, resolved itself into a condition where the defendants had requested of Jones that he accept a mortgage of $200,000; that $250,000 could not be obtained, and that Jones, with the consent of the defendants, procured a loan of $200,000 as the defendants desired. It is clear, therefore, that Palliser did not fulfill his contract, and that Jones procured a mortgage for the amount which the defendants had requested that they be permitted to do in fulfillment of the contract.
To this extent it may be said that there was a modification of its terms, but it cannot be said that it constituted a breach of the agreement upon the part of Jones. Under these circumstances, what were the rights of the parties ? Jones held the legal title to the property, and at least occupied the position of' a mortgagee in possession, and as such, entitled to be paid. (Sahler v. Signer, 44 Barb. 606; Phyfe v. Riley, 15 Wend. 248.)
He had not agreed to deliver a deed or the possession of the property except upon a certain contingency. Out of the proceeds of the mortgage which was expected to be obtained, there was nothing which would be paid to the defendants, and it is clear that nothing could be realized for them upon a mortgage of $200,000. Their security for payment as provided in the contract was to come from a second mortgage of $40,000, or from a sale of the premises. Such is the express provision of the 4th and 10th clauses of the agreement. It does not appear that there has ever been any attempt by anybody to procure a second mortgage while the judgment which has been rendered directs a sale of the premises. It is evident that the primary security for the payment of all of the parties, Jones and the creditors, was the property. Jones was to be first paid, and nothing which he has done deprives him of this right. The failure to secure the mortgage of $250,000 placed him in a position where there was insufficient to discharge the mortgages and other claims which he held. As lié was under no obligation to deed the premises unless the mortgage was secured, so he was under no *552obligation to convey under the modification as carried out, unless' he was as fully protected as he would have'been had the contract been fulfilled. Consequently as the situation of the parties had been changed by reason of the failure of Palliser to procure the mortgage for $250,000, Jones was under no obligation to convey or surrender possession, unless he was secured in the application of the proceeds of the property to the payment of his claims, as they were prior to any rights possessed by the defendants.
Up to this time Jones had taken no steps which cut off the rights of the defendants in and to this property, nor have the defendants placed Jones in default by tendering performance. As the agreement has only been partially executed and modified in other respects, neither party would seem to be entitled to a strict fulfillment of its conditions. Each party has equitable interests in the property. The value .of such interests depends upon the amount which the property can be made to realize on a sale, and we see no other way in which the rights of all the parties can be equitably adjusted, except by a sale of the property and a distribution of the proceeds according to the priority of the respective rights. This is what the judgment accomplishes. It may be true that the defendants will not be benefited by such disposition of the case. This is.not due, however, to the inequitable character of the judgment, but is due either to the insufficiency in value of the property to discharge all the claims, or to the inability of the defendants to protect their interests upon a sale. There is no authority in the court, however, to grant other relief in this respect. In view, however, of the conceded equities possessed by the defendants in this property, we do not think that costs of this action should have been awarded in favor of the plaintiff, but that under the circumstances costs should not have been awarded in favor of either party. It follows that the judgment should be modified by striking out the awards of costs to the plaintiff and as modified the judgment should be affirmed, without costs of this appeal to either party.
Van Brunt, P. J., Patterson, O’Brien and Ingraham, JJ., concurred.
Judgment modified by striking out the award of costs to the plaintiff and as modified affirmed, without costs.