
198 Cal.App.3d 526 (1988)
243 Cal. Rptr. 715
BMP PROPERTY DEVELOPMENT, Plaintiff and Appellant,
v.
ROY S. MELVIN et al., Defendants and Respondents.
Docket No. D005675.
Court of Appeals of California, Fourth District, Division One.
January 15, 1988.
*527 COUNSEL
Roseman & Mann and Jack I. Mann for Plaintiff and Appellant.
*528 John W. Brewer, Chopak & Glatthorn and William I. Chopak for Defendants and Respondents.
OPINION
TODD, J.
(1a) BMP Properties (BMP) claims the trial court erred in concluding loans it made as part of a real estate trade were purchase money obligations, thus preventing BMP from seeking a deficiency judgment under Code of Civil Procedure[1] section 580b. BMP asserts the court, in so concluding, improperly relied upon two facts. First, because some of the funds advanced were not used to satisfy the purchase price, BMP argues the court cannot classify the obligations as purchase money. Second, because the land trade and loan agreement were handled by different escrows, BMP argues the court erred in concluding the two escrows were part of a single transaction for the sale of real property. For the reasons set forth below, we affirm the judgment of the trial court.

FACTS
Robert J. Reiminger (Reiminger) and Roy S. Melvin (Melvin) owned a piece of property in San Diego. George and Evelyn May (collectively May) also owned a piece of property in San Diego. These individuals desired to dispose of these properties, hoping to move up in their investments. BMP was the developer and owner of Monroe Villa Condominiums  a 14-unit complex in San Diego. Due to cash problems, BMP wished to sell off its interest in the development. A transaction was structured whereby Reiminger, Melvin and May would trade their properties to BMP and in return acquire eight condominiums at Monroe Villas.[2]
The properties held by the respective parties were virtually identical in value  a $705.88 difference in equity favored Reiminger, Melvin and May. There was, however, one significant distinction between the properties; BMP's condominiums had not been rented since they were built. Melvin realized the payment obligations on the condominiums coupled with the lack of incoming rent monies would result in a negative cash flow. Thus, BMP was required to come up with additional cash as a condition of the deal. The resulting agreement called for a trade of the properties and obliged BMP to make eight $10,000 loans on the individual condominium units evidenced by notes and second deeds of trust.
*529 The transfer and loans were handled by two separate escrows. These escrows were, however, processed within six days of one another. In addition, the escrows made reference to one another, and the closings of the escrows were mutually dependent.
When the escrows closed, a portion of the $80,000 was used to pay real estate commissions, escrow fees, recording costs and expenses. There was no agreement as to the use of the remaining loan proceeds. May did use some of the funds for personal obligations.
The holders of the first deed of trust caused a trustee's sale to be held when Reiminger, Melvin and May began missing payments on the first and second trust deeds. BMP did not participate in that sale. BMP then sought to have Reiminger, Melvin and May declared personally liable on five of the eight notes.[3]
The parties agreed, pursuant to section 638, subdivision 1, to have the issue whether the loans were, in fact, purchase money obligations decided by a court-appointed referee. On August 16, 1985, an order of the court was issued submitting the matter to Justice Gordon Cologne (retired Associate Justice of the Court of Appeal, 4th Dist., Div. 1). After a hearing on the matter, Referee Cologne concluded the loans were purchase money obligations, thus precluding BMP's asserted right to collect personal judgments against Reiminger and May.[4] This finding was accepted by the superior court and final judgment entered on October 9, 1986. This appeal ensued.

DISCUSSION
The only issue which the referee was asked to resolve was whether the eight $10,000 loans were purchase money obligations. Section 580b prevents a party seeking a deficiency judgment on a note secured by a dwelling for not more than four families from doing so where the loan "was in fact used to pay all or part of the purchase price...." The referee made the following finding: "The transaction being the singular part of the consideration for a sale of real property, there can be no recovery on the note for a deficiency after a trustee sale in light of the provisions of California Code of Civil Procedure § 580 (b) [sic]." BMP argues the established facts do not support the referee's conclusion. We do not agree. (2) In examining the alleged factual errors made by the referee, our power is very limited, *530 "begin[ning] and end[ing] with the determination as to whether, on the entire record, there is substantial evidence, contradicted or uncontradicted, which will support that determination." (Stark v. City of Los Angeles (1985) 168 Cal. App.3d 276, 284 [214 Cal. Rptr. 216].) (1b) We find substantial evidence in support of the referee's conclusion.
BMP first alleges, because some of the funds were used for purposes other than satisfying the purchase price, the referee erred in concluding the loans were purchase money deeds of trust. The crux of BMP's argument is that it is not possible to classify a deed of trust as a "purchase money deed of trust" unless the funds advanced are used only to satisfy all or part of the selling price. This extremely conservative reading of section 580b ignores the realization that "the `system' [anti-deficiency legislation] has been liberally construed to effectuate the specific legislative purpose behind it." (Prunty v. Bank of America (1974) 37 Cal. App.3d 430, 436 [112 Cal. Rptr. 370].)
In Bargioni v. Hill (1963) 59 Cal.2d 121, 123-124 [28 Cal. Rptr. 321, 378 P.2d 593], the purchaser of certain land agreed to pay $300,000 for that land. In addition, the purchaser agreed to pay the broker's commission of $10,000. In order to pay the broker's commission, the purchaser executed a $5,000 note, which became a lien on the property, to the broker. (An associated broker accepted a second $5,000 note for the commission. The second note was paid and not involved in the case.) When his security was extinguished by a senior lienor through private sale, the broker sought a personal judgment against the purchaser. The purchaser raised section 580b as a defense.
Justice Traynor, speaking for the court, concluded: "A written agreement of sale was signed by the buyer and seller and both brokers, under which the purchase price was set at $310,000 and the seller was to pay the brokers' commissions, which amounted to $10,000. Thereafter, however, defendant agreed to pay the brokers' commissions, and the purchase price was correspondingly reduced to $300,000 net to him from the sale. He also knew that the seller was obligated to pay the brokers' commissions of $10,000, and that the seller had agreed to finance the purchase on these terms. Thus, in accepting defendant's note in payment of the commission, plaintiff extended credit that otherwise would have been extended by the seller. That credit was necessary to the consummation of the sale. The only reasonable inference that can be drawn from this evidence is that plaintiff intended to and did partially finance the purchase. Since his note was secured by a trust deed on the motel, his recovery is barred by section 580b." (Ibid., italics added, fn. omitted.) Thus, in Bargioni the entire value of the broker's secured interest was used to pay for something other than the purchase price, i.e., the broker's commission. However, because the execution of the *531 note and mortgage was an integral element in the consummation of the transaction, the court determined the broker's lien was a purchase money obligation.[5]
Here, the referee's fact statement is replete with evidence the eight $10,000 loans were necessary to the consummation of the sale. Because the condominiums had never been rented, no money was coming in. In fact, the inability to cover the costs of developing the condominiums generated by the lack of positive cash flow was a major reason BMP decided to trade the condominiums. Melvin realized the lack of incoming rent monies would cause a negative cash flow. Although the values of the properties were virtually identical, the lack of incoming cash made the condominiums a riskier acquisition. Melvin thus demanded cash up front in the form of eight $10,000 loans. Without this $80,000 in cash, Reiminger, Melvin and May would not have been able to afford the transfer of land. The court had substantial evidence from which it could conclude that, but for the additional loan agreement, Reiminger, Melvin and May would not have agreed to the trade of the properties.
BMP next argues, because the land trade and loan arrangement were handled by separate escrows, the court erred in concluding these two contracts were part of a singular transaction for purposes of section 580b. We disagree.
(3) Civil Code section 1642 reads: "Several contracts relating to the same matters, between the same parties, and made as parts of substantially one transaction, are to be taken together." It is not necessary these several contracts be executed contemporaneously to bring them within the purview of Civil Code section 1642; it is a question of fact whether the contracts are intended to be elements of a singular transaction. (Nevin v. Salk (1975) 45 Cal. App.3d 331, 338 [119 Cal. Rptr. 370].) (1c) Here, the subject matter of the loan agreement bears substantial relatedness to the subject matter of the land trade contract. The parties to the contracts are identical. Finally, there is ample evidence supporting the conclusion the two contracts were intended to be "parts of substantially one transaction." The escrows for the contracts were processed only six days apart. The escrows make reference to one another, and their closings were mutually dependent. In addition, because of the negative cash flow problem, Reiminger, Melvin and May could not have afforded to enter into the land trade without cash in hand. There is substantial evidence from which the referee could conclude, *532 pursuant to Civil Code section 1642, the two contracts should be read together for purposes of section 580b.
BMP asserts the case of Pike v. Tuttle (1971) 18 Cal. App.3d 746, 751 [96 Cal. Rptr. 403], precludes this court from concluding the two contracts were one transaction. BMP's reliance on Pike is misplaced.
In Pike, the court held a second loan, although authorized by the original purchase money mortgage, was not a purchase money obligation. The loan agreement was executed between the original mortgagee and the mortgagor's successor in interest. Further, the second loan was made five years after the original purchase money mortgage was executed. These factors, militating against the application of Civil Code section 1642, render Pike inapplicable here.

DISPOSITION
Judgment affirmed.
Butler, Acting P.J., and Thaxton, J.,[*] concurred.
Appellants' petition for review by the Supreme Court was denied March 31, 1988.
NOTES
[1]  All statutory references are to the Code of Civil Procedure unless otherwise specified.
[2]  May received four units; Reiminger and Melvin received three units; May, Reiminger and Melvin received one unit.
[3]  Three units owned by May were not at issue because of a settlement reached between the parties.
[4]  The parties stipulated that the proceedings could and would be conducted only as to Reiminger and May and no proceedings would be had at this time as to Melvin who is subject to the jurisdiction of the federal courts in bankruptcy.
[5]  A similar conclusion was reached in Shepherd v. Robinson (1981) 128 Cal. App.3d 615, 624 [180 Cal. Rptr. 342] where the court concluded a loan was a purchase money obligation despite the fact some of the funds were used to cover closing costs, termite and roof repair and back payments on a previous note and deed of trust.
[*]   Assigned by the Chairperson of the Judicial Council.
