The surplus in question arises upon a sale of certain premises in Porsyth street, in the city of New York, under a decree of foreclosure in this action. By deed dated the 12th of July, 1889, apparently executed, however, on the 16tli of said July, the appellant and wife conveyed the premises in question, subject to $32,000 in mortgagee, to the respondent, Lena.Davis, the consideration named in the deed being the sum of $39,000. By deed dated on said 16th of July said respondent conveyed to the appellant Greenberg, subject to the same mortgages, an undivided half of said premises, the consideration named being $1. The latter conveyance, how■ever, was stated upon its face to be upon the following understanding and agreement, viz.: That whereas, the respondent had purchased the premises for the sum of $37,000, $5,000 being paid in cash and $32,000* subject to mortgages; and whereas, the respondent had paid $4,999 of the $5,000, and the appellant had paid $1; and whereas, it had been mutually agreed that the said parties should share in the profits realized by the investment equally, and that the respondent should not claim, because of her excess of investment, more than the amount invested as should be made by her in and about the premises and one-half of the surplus, and that all the rents and profits of the premises should be subject to the payment of the interest and installments ■of said mortgage, and the taxes, insurance, and repairs of the premises, and the surplus, if any, applied to the payment of the principal of the third mortgage,—the respondent should have the absolute right to collect all the ■rents of the property, and apply the same as above stated. A restriction upon alienation was placed upon both parties, and a provision was made that, in case either should convey his interest in the premises, or institute or ■cause to be instituted any proceedings at law looking to a sale, either party should have the option to consider that the party offending had contracted to purchase the entire premises for the sum of $39,000. These deeds were recorded together. One of the mortgages referred to in these deeds having been foreclosed, the surplus arose in respect to which this proceeding is taken. The counsel for the appellant before the referee does not seem to have had a very well defined idea as to how he was to reach the surplus which had arisen ■upon the foreclosure of this mortgage. If he claimed to consider, under the terms of the agreement above mentioned, the respondent to be the purchaser ■of the premises at $39,000, it was clear that he could have no claim upon the surplus, because the respondent would be entitled to receive the same as purchaser. This, however, seems to have been the claim urged before the referee ■by the appellant in the first stages of this reference. ' Upon this claim being •ruled out by the referee, the counsel for the appellant claimed the right in this proceeding to an account of the rents and profits which the respondent had received, it being proven that she had collected the rents, and that, after the respondent should be reimbursed for the advances which she had made, he was entitled to share in whatever profits might be realized from the adventure. The referee in the first instance refused to take this account, but finally changed his ruling, and notified the attorneys for the respective claimants of this fact, and some evidence was taken bearing upon this issue. Among other evidence, the respondent swore a witness, who testified that a large amount of rents had been collected by him as agent for the respondent, and paid over .to her, and also that certain disbursements had been made, and *289that there was a balance to a considerable amount which had been received, and had been unaccounted for by the respondent. Upon the termination of the examination of this witness, the counsel for the respondent stated that he withdrew the account which this witness had presented, and that he did not offer any evidence in regard to the accounts at all. The counsel for the appellant objected to this withdrawal, which objection was overruled, and a motion to strike out the evidence of the witness was granted by the referee, to which ruling the appellant excepted. It seems to us that this was clearly error. The most that could be said in favor of the respondent was that she was mortgagee in possession, entitled to receive the rents, etc., until her debt was paid. The appellant had a right to show that she had been fully reimbursed out of the rents received for the amount advanced on the purchase money as recited in the deed last above named, and, whatever surplus might remain after such reimbursement, the appellant was entitled to claim the half thereof according to the agreement winch had been entered into between these parties at the time the respondent conveyed the one-half of the premises to the appellant. Upon the record the appellant was the owner of one-half of these premises over and above the mortgages, and subject to the equitable lien which the respondent had for reimbursement, as mentioned in the deed from her to the appellant. We think, therefore, that the referee erred in allowing this testimony to be stricken out, and that the appellant had a right to show that the respondent had been reimbursed, and to recover out of this surplus the half of that which remained. The order should be reversed, and a new order of reference made, to ascertain the amount of appellant’s claim upon such surplus moneys; costs of this appeal to abide the final event. All concur.