This opinion will be unpublished and
may not be cited except as provided by
Minn. Stat. § 480A.08, subd. 3 (2000).
STATE OF MINNESOTA
IN COURT OF APPEALS
Joseph P. Varley Construction, Inc.
a/k/a/ Varley Construction Co., Inc.,
The Community Home Program Company,
a Minnesota nonprofit corporation,
US Bank Trust National Association, a
national banking association, as Trustee,
City of Minneapolis, Minnesota,
a municipal corporation,
American Home Health Services, Inc.,
a Minnesota corporation,
TCF National Bank Minnesota, a national
The Housing and Redevelopment Authority
in and for the City of Eden Prairie,
a public body,
Filed July 24, 2001
Hennepin County District Court
File No. 99-5745
John G. Patterson, Leonard W. Glewwe, Moore, Costello & Hart, 701 Fourth Avenue. South, Suite 1350, Minneapolis, MN 55415 (for appellant)
Patrick J. McLaughlin, Eric J. Moutz, Dorsey & Whitney, 220 South Sixth Street, Minneapolis, MN 55402 (for respondent US Bank Trust National Association)
Katherine M. Bergenthal, Eric R. Heiberg, Coleman, Hull & vanVliet, 8500 Normandale Lake Boulevard, Suite 2110, Minneapolis, MN 55437 (for respondent US Bank Trust National Association)
Considered and decided by Amundson, Presiding Judge, Lansing, Judge, and Shumaker, Judge.
In this construction/mechanic’s lien dispute, appellant builder challenges the district court’s grant of summary judgment alleging genuine issues of material fact exist regarding whether (a) builder had notice of mortgages on the property based on documents in builder’s files; (b) loan agreements stating builder could be paid directly entitled builder to enforce those agreements as a third-party beneficiary; and (c) the trustee of a construction fund was unjustly enriched by being allowed to retain work when the builder remained unpaid. We affirm.
Appellant Joseph P. Varley Construction, Inc. (Varley Construction) contracted with respondent The Community Home Program Company (CHP), a non-profit corporation, to construct 32 units of adult foster care housing in Hennepin County. Nearly all of the funding for the CHP project was derived from the sale of $5,300,000 of tax-exempt, limited-obligation bonds and $1,145,000 of taxable subordinate bonds issued by the City of Minneapolis (City). Defendant US Bank Trust National Association (US Bank) served as trustee of the bond proceeds.
Joseph Varley, principal of Varley Construction, had met initially with Peter Markoe, an incorporator of CHP and principal of defendant American Home Health Services, Inc. (AHHS), a for-profit corporation affiliated with CHP. During contract negotiations, Varley attended two meetings with representatives from AHHS, CHP, and their attorneys. Varley was told that the bond underwriter insisted on a payment provision tied to a stated level of occupancy of the homes. Markoe indicated that this provision should not be a concern because there were currently 80 people on a waiting list to move in. But the record reflects that Markoe knew only 24 to 35 people to be potential residents for these homes.
In November 1996, Varley Construction and CHP entered into a standard form construction contract containing an addendum stating that Varley Construction agreed to subordinate its lien rights to any security interests of the bond issuer or trustee in the project. The bond financing closed several months later, in April 1997. The City loaned the bond proceeds to CHP; CHP’s obligation to repay the loan was secured by mortgages on the properties on which the units were to be built. Under the terms of two indentures of trust between the City and US Bank, the City assigned its rights under the loan agreements and the mortgages to US Bank as trustee. The mortgages were filed on May 16, 1997.
An indenture of trust between the City and US Bank also established a construction fund from which funds would be distributed through a disbursing agent to Varley Construction as general contractor as progress was made on the project. A disbursing agreement between CHP, US Bank, and the disbursing agent controlled the payment mechanism by which bond proceeds were to be disbursed for the project.
On April 14, 1997, as part of a preclosing process, an attorney representing the City in the bond issue faxed to Varley, for his signature, documents entitled “Assignment and Agreement Regarding Construction and Architect Contracts” (assignment) and “Contractor’s Acknowledgement and Consent” (acknowledgement). The assignment contained the following language:
To secure payment of the Bonds, [CHP] will execute and deliver to the city, which in turn will assign to the Trustee, two Mortgage, Security Agreements and Fixture Financing Statements, both dated as of April 1, 1997, (collectively, the “Mortgage”) covering certain property which, among other things, includes the real estate upon which the Project is located (the “Real Estate”) and the buildings, improvements and fixtures now or hereafter located thereon.
US Bank alleges that Varley signed the consent and faxed it back to bond counsel on April 14, 1997, as well as executing a clean copy and faxing it back on April 17 for the final closing. Varley stated that he had no independent recollection of receiving these documents, but acknowledged that his files contained a copy of the acknowledgment dated April 14, 1997, which bore his signature, as well as an unsigned copy of the assignment.
Varley Construction began work on the project on April 24, 1997. The company completed 11 units and performed construction improvements on two other parcels. In accordance with the disbursing agreement, Varley Construction received payment for six of the completed units in January 1998. CHP, however, was declared in default under the terms of the loan agreements in May 1998, and US Bank declined to compensate Varley for its remaining work. Instead, US Bank commenced a separate action to obtain a receiver for the properties and prepared to foreclose its mortgage on the properties and distribute the proceeds of the foreclosure sale to the bondholders.
Varley Construction filed mechanics’ lien statements to perfect its mechanics’ liens on the five properties for which it had not received payment and brought an action to foreclose on these liens, asserting that they were superior to the mortgage held by US Bank for the benefit of the bondholders. Varley Construction also alleged that it should be paid from the cash retained by US Bank, either on the theory that it was a third-party beneficiary of the loan agreements and the assignment of the construction contract, or on the theory that US Bank and the bondholders had been unjustly enriched by failing to compensate Varley Construction for its remaining work. The district court held that Varley Construction was entitled to assert a claim of fraudulent inducement of the construction contract to defeat US Bank’s right to rely on the subordination provision therein. The court, however, granted US Bank summary judgment on the dismissal of Varley Construction’s foreclosure of mechanics’ lien claims, concluding that Varley Construction had actual notice of the mortgages on the properties at the time it started its first work on the project. The court also granted summary judgment on the third-party beneficiary and unjust enrichment claims asserted against US Bank. This appeal followed.
On appeal from summary judgment, this court asks two questions: (1) whether there are any genuine issues of material fact and (2) whether the lower courts erred in their application of the law. State by Cooper v. French,460 N.W.2d 2, 4 (Minn. 1990). No genuine issue of material fact exists “where the record taken as a whole could not lead a rational trier of fact to find for the nonmoving party.” DLH, Inc. v. Russ,566 N.W.2d 60, 69 (Minn. 1997) (quoting Matsushita Elec. Indus. Co. v. Zenith Radio Corp.,475 U.S. 574, 587, 106 S. Ct. 1348, 1356 (1986)). The reviewing court on appeal must view the evidence in the light most favorable to the party against whom judgment was granted. Fabio v. Bellomo, 504 N.W.2d 758, 761 (Minn. 1993).
Varley Construction first contends that a genuine issue of material fact exists concerning whether it had not yet received actual notice of the mortgages given to secure the repayment of the bond proceeds when construction began, so that its mechanics’ liens would take priority over these mortgages.
Generally, under Minnesota law, a mechanic’s lien takes priority over all unrecorded mortgages. Minn. Stat. § 514.05, subd. 1 (2000). But an exception exists when the mechanic's lien claimant has actual notice of an executed, but not yet recorded, mortgage at the time the lien attaches. Id.; Jadwin v. Kasal, 318 N.W.2d 844, 849 (Minn. 1982). Minn. Stat. § 514.05, subd. 1 (2000) provides that:
All liens, as against the owner of the land, shall attach and take effect from the time the first item of material or labor is furnished upon the premises for the beginning of the improvement, and shall be preferred to any mortgage or other encumbrance not then of record, unless the lienholder had actual notice thereof.
The Eighth Circuit Court of Appeals, applying Minnesota law, has held that an architectural firm had actual notice of an unrecorded mortgage at the time its mechanic’s lien attached, when a principal of the firm had signed two documents, including a consent to assignment, that specifically referenced the mortgage. Resolution Trust Corp. v. Ford Mall Assocs., Ltd.,30 F.3d 93, 96 (8th Cir. 1994). The court noted that the architectural firm knew that the project had gone forward from the time the documents were signed. Id.
Here, it is undisputedthatVarley Construction performed its first construction work on the property on April 24, 1997. Therefore, its earliest mechanic’s lien on the project attached on that date. The two mortgages between CHP and the City of Minneapolis securing payment of the bonds were signed on April 14, 1997. That same day, Briggs & Morgan, bond counsel for the City, faxed the assignment and acknowledgement to Varley for his signature. The assignment directly referenced the mortgages, and the acknowledgement referred specifically to the assignment. Although Varley had no independent recollection of receiving these documents, he agreed that his files contained an unsigned copy of the assignment, as well as a copy of the acknowledgement, dated April 14, 1997, which bore his signature. US Bank also produced a copy of the acknowledgement with Varley’s signature dated April 17, 1997. This evidence strongly suggests that Varley knew about the existence of the mortgages by that date.
In addition, it is significant that Varley Construction did not begin work on any of the properties until April 24, 1997, a week after the mortgages had been executed. It would have been unreasonable for the company to start work on such a substantial project without knowing that the governing agreements had been signed and funding was fully in place. Consequently, the district court did not err in concluding that Varley is deemed to have had actual notice of the existing mortgages when its mechanics’ liens attached, so as to defeat its claim of priority over those mortgages.
Varley Construction next contends that it was a third-party beneficiary of the construction loan agreements between CHP and US Bank, thus establishing a right to payment under those agreements.
The prevailing rule in Minnesota and other jurisdictions establishes that a third party may assert a claim on a contract made for that party’s direct benefit. Buchman Plumbing Co. v. Regents of the Univ. of Minn.,298 Minn. 328, 333, 215 N.W.2d 479, 483 (1974).The Minnesota Supreme Court has adopted the intended beneficiary approach outlined in the Restatement (Second) of Contracts § 302 (1979). Cretex Cos., v. Construction Leaders, Inc.,342 N.W.2d 135, 139 (Minn. 1984). Under this approach, if recognizing third-party beneficiary rights is appropriate to effectuate the intention of the parties and either the duty owed or the intent to benefit test is met, the third party can recover as an intended beneficiary. Id.
The duty owed test requires that “the performance of the promise will satisfy an obligation of the promisee to pay money to the beneficiary.” Mears Park Holding Corp. v. Morse/Diesel, Inc.,427 N.W.2d 281, 285 (Minn. App. 1988) (quoting Restatement (Second) of Contracts§ 302(1)(a) (1979)). The intent to benefit test is satisfied where “the circumstances indicate that the promisee intends to give the beneficiary the benefit of the promised performance.” Id. (quoting Restatement (Second) of Contracts § 302 (1)(b)). The requisite intent must be found in the contract as read in light of all the surrounding circumstances. Buchman Plumbing,298 Minn. at 334, 215 N.W.2d at 483. If no intent to benefit has been shown, the third party is only an incidental beneficiary and cannot enforce the contract. Id.at 334-35, 215 N.W.2d 483-84. 
Varley argues that the duty owed test was met here because under the terms of the disbursing agreement, US Bank agreed that payments would be delivered directly to Varley Construction after CHP submitted a disbursement request. The disbursing agreement, however, is properly read as controlling only the method by which Varley Construction was to be paid under the terms of its direct construction contract with CHP, not as establishing rights in Varley Construction as a third-party beneficiary. US Bank never undertook to act as surety for CHP to enforce a promise due to Varley Construction, and never agreed to pay any sums owed to Varley Construction by CHP. Under the terms of the assignment, CHP agreed that US Bank, as trustee, assumed no duties with respect to the construction contract unless US Bank gave written notice that it had affirmatively exercised its right to complete construction following a default. This did not occur. In fact, the acknowledgement signed by Varley stated specifically that US Bank was not required to cure any default under the construction contract. Therefore Varley Construction cannot recover as a third-party beneficiary under the duty owed test.
Nor can Varley successfully maintain that it was a third-party intended beneficiary under the intent to benefit test. The financing documents do not evidence an intent that Varley Construction acquire a right to be paid directly by the trustee in the event of default by CHP. In its construction contract with CHP, Varley Construction expressly agreed to subordinate its lien rights in the project to the security interest held by US Bank as trustee for the bondholders. The provision in the assignment stating that US Bank had the option, but not the duty, to continue construction after default by CHP, indicates that the primary concern of US Bank was to protect this security interest. Had the bondholders not been assured of priority, the project would never have been funded in the first place.
To support its third-party beneficiary argument, Varley cites Twin City Constr. Co. v. ITT Industrial Credit Co.,wherethis court held a construction company to be a third-party beneficiary of a construction loan agreement where the contractor was required to vacate its enforceable mechanic’s lien and subordinate its interest as a precondition to a “rescue loan” by a lender in order to complete a construction project for the owner. 358 N.W.2d 716, 718-19 (Minn. App. 1984). In return for these commitments, the lender agreed to make payments directly to the construction company. Id.at 717.
Varley’s reliance on Twin City Constr.ismisplaced. US Bank, unlike the lender in Twin City Constr.,did not assume CHP’s duty to pay Varley under the construction contract. In fact, under the disbursing agreement, US Bank expressly reserved the right to stop releasing funds for payment from the construction fund in the event of default by CHP. In addition, Varley Construction, unlike the contractor in Twin City Constr.,was not required to give up its mechanic’s lien rights completely as a precondition to work on the project. Varley Construction maintained its lien rights; they were, however, subordinated to existing mortgages on the subject properties because Varley Construction had actual notice of these mortgages at the time it first began work on the premises.
Lastly, Varley Construction argues that US Bank was unjustly enriched by retaining, but not paying for, the housing units that Varley Construction had built. To establish a claim for unjust enrichment, the claimant must show that the defendant has knowingly received or obtained something of value for which the defendant “in equity and good conscience” should pay. ServiceMaster v. GAB Business Servs., Inc.,544 N.W.2d 302, 306 (Minn. 1996) (quotation omitted). Unjust enrichment does not lie simply because one party benefits from the efforts or obligations of others; instead it must be shown that a party was unjustly enriched in the sense that the term unjustly could mean illegally or unlawfully. First Nat. Bank v. Ramier,311 N.W.2d 502, 504 (Minn. 1981). Equitable relief may be granted only upon a showing of the inadequacy of any legal remedy. Zimmerman v. Lasky,374 N.W.2d 212, 214 (Minn. App. 1985), review denied (Minn. Nov. 26, 1985).
The district court properly concluded that if Varley Construction were induced to enter the construction contract by material misrepresentations, no valid contract existed to determine the scope of Varley Construction’s rights. Therefore, the claim of unjust enrichment must be examined. In this context, Varley argues again that Twin City Constr.controls. The facts in this case, however, are clearly distinguishable from those in Twin City Constr., wherethe lender refused to tender payment on a legitimate request for payment made before the owner’s default. 358 N.W.2d at 717. In the instant case, US Bank in good faith processed and paid every request for payment by CHP prior to default.
Finally, it cannot be said that US Bank held the subject property and its improvements illegally or unlawfully. Upon default by CHP, US Bank, as trustee, exercised its legal option to suspend construction on the project and foreclose on the loan agreements. In so doing, US Bank was acting properly in its fiduciary capacity for the benefit of its bondholders. The bondholders, innocent parties themselves, relied on the priority of the mortgage lien to recapture as much of their original investment as possible once default had occurred. In fact, the very term unjust enrichment is a misnomer in this case. Since the project has resulted in losses exceeding $1,000,000, the bondholders have not been unjustly enriched, but instead have incurred substantial losses of their own.
 Varley Construction also brought breach of contract and unjust enrichment claims against CHP, as well as fraud and negligent misrepresentation claims against CHP and AHHS. Varley Construction subsequently entered into a stipulation and agreement with CHP and AHHS, pursuant to which judgment was rendered against CHP in the sum of $762,284.15, and the claims against AHHS were dismissed.
 While this result establishes the priority of the mortgages over Varley Construction’s mechanics’ liens, it should not technically extinguish the right to assert the mechanic’s lien claims. Therefore, the district court erred in dismissing these claims in rendering summary judgment. However, since insufficient assets exist for the distribution of all claims, we hold that this constitutes harmless error.
 One circumstance to be considered in ascertaining the intent of the parties is whether the contract is for a private or a public construction project. Cretex Cos., 342 N.W.2d at 140. The Minnesota Supreme Court has held unpaid materialmen to be third-party beneficiaries of a contract for disbursing federal funds for payment of housing on an Indian reservation. Duluth Lumber and Plywood Co. v. Delta Development, Inc.,281 N.W.2d 377, 385 (Minn. 1979). The court reasoned thatwhen construction work is performed on public property that is exempt from a mechanic’s lien, the public owner does not need protection against a mechanic’s lien, and injustice would otherwise be suffered by the materialmen who have no lien rights. Id. The court in Cretex Cos.,however,noted that “[t]here would seem to be no reason for the contracting parties to intend to confer a benefit on materialmen who can protect their own interests by filing liens against the property.” 342 N.W.2d at 140.