608 F.2d 28
S.S. SILBERBLATT, INC., and S.S. Silberblatt, Inc., onbehalf of itself and all other persons entitled to share infunds allocated for the improvements of real property ownedby East Harlem Pilot Block Building 1 Housing DevelopmentFund Company, Inc., East Harlem Pilot Block Building 2Housing Development Fund Company, Inc., East Harlem PilotBlock Building 3 Housing Development Fund Company, Inc., andEast Harlem Pilot Block Building 4 Housing Development FundCompany, Inc., Plaintiffs-Appellants,v.EAST HARLEM PILOT BLOCK BUILDING 1 HOUSING DEVELOPMENT FUNDCOMPANY, INC., East Harlem Pilot Block Building 2 HousingDevelopment Fund Company, Inc., East Harlem Pilot BlockBuilding 3 Housing Development Fund Company, Inc., EastHarlem Pilot Block Building 4 Housing Development FundCompany, Inc., Patricia Roberts Harris, as Secretary of theUnited States Department of Housing and Urban Developmentand Chemical Bank, Defendants-Appellees.
No. 715, Docket 78-6191.
United States Court of Appeals,Second Circuit.
Argued April 23, 1979.Decided Oct. 1, 1979.As Amended Oct. 23, 1979.

A. David Benjamin, New York City (Kenneth M. Block, Richard S. Fries, Demov, Morris, Levin & Shein, New York City, of counsel), for plaintiffs-appellants.
Jerome T. Orans, New York City (Gary H. Greenberg, Orans, Elsen, Polstein & Naftalis, New York City, of counsel), for defendants-appellees East Harlem Pilot Block Buildings 1-4 Housing Development Fund Co., Inc.
Patrick H. Barth, Asst. U. S. Atty., New York City (Robert B. Fiske, Jr., U. S. Atty. for the Southern District of New York, Peter C. Salerno, Asst. U. S. Atty., New York City, Patricia Roberts Harris, Secretary of the Dept. of Housing and Urban Development, Washington, D. C., of counsel), for defendant-appellee Patricia Roberts Harris, Secretary, HUD.
Ann M. Galvani, New York City (Ralph L. McAfee, Richard S. Simmons, Lynne M. Barry, Cravath, Swaine & Moore, New York City, of counsel), for defendant-appellee Chemical Bank.
Before WATERMAN, FEINBERG and MANSFIELD, Circuit Judges.
MANSFIELD, Circuit Judge:


1
The principal question raised by this appeal is whether the Secretary of Housing and Urban Development may be held liable to a general contractor for amounts due on a project financed under § 236 of the National Housing Act, as amended, 12 U.S.C. § 1715z-1 (the Act).1 Plaintiff-appellant, S.S. Silberblatt, Inc., agreed as general contractor with East Harlem Pilot Block Buildings 1-4 Housing Development Fund Co., Inc.  (East Harlem) to construct a large apartment structure, Taino Towers, located in the East Harlem section of Manhattan.  East Harlem is a non-profit, assetless community organization.  The building was planned and supervised as a joint venture of East Harlem and HUD.  Construction financing was provided by Chemical Bank, with the mortgage insured under § 236(j) of the Act.


2
As a result of financial problems and construction delays encountered by the project in early 1976, Chemical Bank assigned the mortgage to HUD.  Silberblatt suspended construction and some time later was dismissed by East Harlem prior to completion of the project.  Silberblatt sued HUD, East Harlem and Chemical Bank in the New York State Supreme Court seeking to recover amounts allegedly owing it for work performed on the project.  At the instance of the Secretary the action was removed to the District Court for the Southern District of New York under 28 U.S.C. § 1442(a)(1) and assigned to Judge Milton Pollack.  After a lengthy period during which the litigation was held in abeyance while the parties engaged in unsuccessful settlement negotiations, Judge Pollack rendered a decision on November 8, 1978, granting summary judgment in favor of the Secretary and Chemical Bank, and partial summary judgment to East Harlem, with remaining state law claims against East Harlem remanded to the state court.


3
Judge Pollack ruled that Silberblatt was precluded from recovering on its federal quantum meruit claims against the Secretary and East Harlem because it had not completed the contract work and that Silberblatt's attempt to impress a lien on funds held by Chemical Bank must fail because Chemical held no funds for the account of the Taino Towers project.  Judge Pollack also denied Silberblatt's motion for leave to amend its complaint against Chemical Bank to restate a cause of action against it as one for breach of contract.2 We reverse the grant of summary judgment in favor of the Secretary and East Harlem on the ground that Silberblatt's failure to complete construction does not necessarily preclude it from obtaining payment for work it performed on the project as general contractor.  We also reverse the denial of Silberblatt's motion for leave to amend its complaint against Chemical Bank, which had not yet filed an answer when leave was sought.


4
Section 236 of the National Housing Act, as amended, 12 U.S.C. § 1715z-1, is part of a multifaceted statutory scheme serving the dual purposes of providing affordable housing to millions of Americans and of stimulating the building trades and the economy as a whole through various forms of federal insurance of private-sector financing of residential construction.  Section 236(j) pertains specifically to federal mortgage insurance for certain multifamily rental and cooperative housing projects for lower income, elderly, or handicapped families.  Taino Towers, located in one of New York's most impoverished neighborhoods, is one such project.


5
Section 236 also relieves the owner of such projects of most of the financing costs, thereby enabling the owner to charge below-market rents, by making available "interest reduction payments" equal to the difference between the monthly payment for principal, interest, and mortgage insurance premium, which the project owner as mortgagor is obligated to pay under the mortgage, and the amount which the owner would pay if the mortgage bore interest at the rate of 1 percent a year. 12 U.S.C. § 1715z-1(c).3


6
The relationships among HUD, the project owner, the mortgagee, and the general contractor are defined by a set of interlocking agreements, all of which are entered on forms prepared by the Federal Housing Administration (a bureau of HUD).  The building loan agreement, mortgage, and mortgage note form the agreement between the project owner and the mortgagee setting out the terms of the loan evidenced by the note and secured by the mortgage.  These documents expressly refer to the fact that the mortgage is insured by HUD.  The other important document is the construction contract entered into by the owner, in this case East Harlem, and the general contractor, Silberblatt.


7
Like virtually all construction contracts, public and private, the contract used in a § 236 project provides that the general contractor is to receive monthly payments in an amount equal to the value of work performed plus materials and equipment delivered to the site in the preceding month, less a "holdback" or "retainage" of 10%.  The accumulated retainage, which in the ordinary course of events is paid to the contractor upon completion of the contract work and satisfaction of certain formalities, provides an incentive for the contractor to complete the work and the owner a fund to pay for completion of the construction in the event of default by the contractor.  Similarly, the building loan agreement provided that the construction loan would be advanced in monthly instalments equal to the monthly payments owed to the general contractor.


8
Under the building loan agreement, in the event of default by the borrower, the "Lender," which includes anyone to whom the note and mortgage have been assigned, may elect either to terminate the loan agreement, in which event funds held by it for the loan are to be used as the Secretary directs, or not to terminate it and enter into possession of the premises to complete construction.  This provision, paragraph 9 of the loan agreement, states that "(a)ll sums . . . expended by the Lender (to complete construction) shall be deemed to have been paid to the Borrower and secured by the Mortgage."  To collect on the mortgage insurance, however, the mortgagee must assign the mortgage and its companion documents to the Secretary (or foreclose and deliver title to the property to the Secretary).  12 U.S.C. §§ 1713(g), 1715z-3(a)(2); 24 C.F.R. § 207.259.  Upon assignment or transfer of title, the mortgagee receives, with some adjustments, the unpaid amount of the mortgage money advanced to the owner less a one percent penalty, which the Secretary may waive. 12 U.S.C. §§ 1713(g), 1715z-3(a)(2); 24 C.F.R. § 207.259(b).  Upon assignment of the mortgage, the Secretary succeeds to all the rights and obligations of the lender under the building loan agreement.


9
By virtue of the mortgage insurance, the mortgagee in a § 236 project has only a limited financial exposure.  Its principal risk is the loss of the one percent penalty upon an assignment of the mortgage to HUD.  The building owner as a practical matter assumes little risk since a § 236 project owner is invariably judgment proof, its only asset being the loan or the building which, as pointed out below, is beyond reach of the contractor.  HUD seeks to shield itself from any direct liability to the contractor, except pursuant to the mortgage insurance, by avoiding any contractual relationship with the contractor.


10
The general contractor bears the risk normally assumed by any contractor who enters a fixed-price contract or, as in this case, a cost-plus contract with a ceiling, namely, that the cost to complete the contract work will exceed the amount of money he is entitled to receive under the contract.  From the contractor's financial point of view, however, a § 236 project differs from most construction projects in two respects.  First, the person with whom he contracts, the project owner, ordinarily has no resources other than the construction loan.  By statute, a mortgage is not eligible for insurance under § 236 unless the mortgagor is a non-profit corporation or association or some other entity not seeking a commercial profit. 12 U.S.C. §§ 1715L (d)(3), (e), 1715z-1(j)(4)(A); 24 C.F.R. § 236.10(a).  Although a non-profit organization is not necessarily an asset-less organization, case law indicates that this is invariably true in § 236 projects.


11
Second, Article 7 of the construction contract provides that the contractor "shall file no mechanic's or materialman's lien or maintain any claim against the Owner's real estate or improvement for or on account of any work done, labor performed or materials furnished under this Contract."  As a result of the combination of the owner's financial impecunity and the contractual bar against filing of liens on the property, the contractor looks only to the mortgage proceeds for payment for the materials and services he provides.


12
The Taino Towers apartment complex consists of four 35-story towers on a monolithic base.  This complex contains about 650 apartments, and was estimated to cost about $45 million.  The loan documents were executed on October 19, 1972, providing for an aggregate loan of up to $39 million,4 and stipulated that construction would be completed by February 19, 1976.  The construction contract, signed October 26, 1972, was a cost-plus agreement with a maximum price of about $36.4 million.  It provided that construction was to be completed by February 26, 1976, unless the completion deadline was extended in accordance with a procedure specified in the contract documents and with the prior written approval of the Secretary.5


13
Construction began in early November 1972, but as is unfortunately too often the case in § 236 projects, construction was not completed by the February 19 or 26 deadlines, which had not been formally extended despite the fact that numerous changes in the plans and specifications had been ordered by the owner or architect.  Invoking this lack of completion as a breach of the loan agreement, on March 19, 1976, Chemical Bank advised East Harlem, the owner, that it was in default on its mortgage and refused to make any further advances on the loan.  As a result East Harlem dishonored Silberblatt's partial payment request for February and Silberblatt, in turn, suspended work at the end of March.  By this time Silberblatt had completed about 90% Of the contract work, the precise amount being a subject of dispute, and had been paid slightly over $30 million.  In addition, $3.4 million had been held back by Chemical, the mortgagee, as accumulated retainage.


14
With the project thus in limbo, the parties began maneuvering to minimize their losses.  On April 19 Chemical advised HUD that it elected to assign to HUD the mortgage in exchange for payment by HUD to it of the mortgage insurance benefits. Chemical then extricated itself from the situation by assigning the mortgage and the mortgage notes to HUD on July 8, 1976.  At this point the balance due on the $39 million loan was about $32.5 million.  The difference between these two sums, amounting to about $6.5 million, was referred to as the "undisbursed mortgage proceeds," even though no tangible fund existed or was transferred from Chemical to HUD.


15
Silberblatt, meanwhile, remained on the construction site until November, 1976, allegedly protecting the property and standing ready, it claims, to resume and complete construction at any moment as soon as it was given some assurance that it would be paid.  On October 29, 1976, East Harlem advised Silberblatt that it was terminating the construction contract because of Silberblatt's material breaches.  A few days later Silberblatt rejected East Harlem's charges and declared that it was terminating the construction contract because of East Harlem's failure to make payments due under the contract.


16
In the meantime Silberblatt had commenced an action in early July, 1976, in the state court to enjoin Chemical from assigning the mortgage to the Secretary and to enjoin Chemical and the Secretary from interfering with or distributing trust monies purportedly held for Silberblatt's benefit.  The Secretary immediately had the case removed to the District Court for the Southern District of New York pursuant to 28 U.S.C. § 1442(a)(1).6 By agreement of counsel and order of Judge Pollack, the temporary restraining order issued by the state court was dissolved and Silberblatt's motion for preliminary injunction withdrawn.  Thereafter, the litigation was held in abeyance as the three remaining principals engaged in settlement negotiations, while Taino Towers suffered inevitable deterioration at the hands of the elements and vandals.


17
The Secretary and East Harlem resolved their differences in an agreement entered into on August 18, 1977, whereby the Secretary became mortgagee in possession of Taino Towers and agreed to contract with Yunque Development Corporation (YDC), apparently an entity newly-formed expressly for the occasion, to serve as developer for completion and management of the housing project.7 Silberblatt and the Secretary were unable to consummate a settlement.  Negotiations between them formally terminated in August 1977, whereupon the litigation begun by Silberblatt resumed.


18
Silberblatt's complaint alleged, in essence, that the undistributed mortgage proceeds constituted a fund subject to attachment by Silberblatt on behalf of itself and its subcontractors for payment of amounts allegedly due on the contract and for damages for East Harlem's failure to make timely payments, totaling nearly $10 million.  During the spring and summer of 1978 some limited discovery took place, with the result, Silberblatt claims, that it first discovered that Chemical's declaration of default on the mortgage was based on East Harlem's failure to complete the project on time, rather than because "the project was running out of money," and that this declaration of default breached the loan agreement either because the project was substantially completed by the contract deadline or because the deadline was or should have been extended to reflect approved change orders.


19
In April 1978 Chemical, which pursuant to stipulation had not yet answered the complaint, moved for dismissal of the claims against it for failure to state grounds for relief, Chemical no longer having possession of any loan proceeds.  Silberblatt responded to this motion with a motion (dated June 2, 1978, but not filed until November 9, 1978) for leave to amend its complaint under F.R.Civ.P. 15(a) to assert a breach of contract claim against Chemical.8


20
As a legal basis for its claims against the Secretary and East Harlem Silberblatt relied principally upon decisions in F.W. Eversley & Co. v. East New York Non-Profit H.D.F.C., Inc., 409 F.Supp. 791 (S.D.N.Y.1976), and Trans-Bay Engineers & Builders, Inc. v. Hills, 179 U.S.App.D.C. 184, 551 F.2d 370 (D.C. Cir. 1976).  These cases had held that a contractor who has not received payment from a HUD project owner for work performed may be entitled to payment from the Secretary who has stepped into the role of mortgagee either on the theory that the contractor is the third-party beneficiary of the building loan agreement, see American Fidelity Fire Insurance Co. v. Construcciones Werl, Inc., 407 F.Supp. 164 (D.V.I.1975); Travelers Indemnity Co. v. First National State Bank, 328 F.Supp. 208, 212-17 (D.N.J.1971), or on the theory that the Secretary is enriched by the contractor's work and is thus obligated to pay for it on a quantum meruit basis. see Trans-Bay, supra, 179 U.S.App.D.C. at 195-97, 551 F.2d at 381-83; Eversley, supra, 409 F.Supp. at 795.


21
Judge Pollack, ruling that Silberblatt was not entitled to recover under either theory advanced by the Eversley/Trans-Bay cases, held that when the contractor has not completed the contract work the Secretary's contractual right to apply the undisbursed loan proceeds toward completion of the project is superior to the contractor's "equitable lien" on these proceeds.  Judge Pollack also denied Silberblatt leave to amend its complaint against Chemical on the ground that Chemical would suffer irremediable prejudice if Silberblatt were allowed to restate its claim at that late stage in litigation.

DISCUSSION

22
Before turning to the major issue, which is whether Silberblatt may seek recovery from the Secretary on a theory of quantum meruit based on unjust enrichment, we must consider some threshold questions.  The first is whether we have subject-matter jurisdiction, since it does not appear that the case could have been brought originally in the federal district court.  This deficiency is remedied by the statute under which the case was removed to the federal court, 28 U.S.C. § 1442(a)(1),9 which confers jurisdiction as well as the right of removal.  Willingham v. Morgan, 395 U.S. 402, 406, 89 S.Ct. 1813, 23 L.Ed.2d 396 (1969); see Bor-Son Building Corp. v. Heller, 572 F.2d 174, 181-82 (8th Cir. 1978); Bennett Construction Co. v. Allen Gardens, Inc., 433 F.Supp. 825, 823 (W.D.Mo.1977).


23
Next is the question of whether, as the Secretary contends, appellant's claim is barred by sovereign immunity.  Section 1 of the National Housing Act, as amended, 12 U.S.C. § 1702, states that the "Secretary shall, in carrying out the provisions . . . of subchapter( ) II (which comprises the sections dealing with mortgage insurance), be authorized in his official capacity, to sue and be sued in any court of competent jurisdiction, State or Federal."  The Secretary argues that this waiver of immunity, which is to be construed liberally, F.H.A. v. Burr, 309 U.S. 242, 245, 60 S.Ct. 488, 84 L.Ed. 724 (1940), is inapplicable to actions such as the present one.  We disagree.


24
As the Supreme Court clearly implied in Burr, supra, when Congress "launche(s) a governmental agency into the commercial world and endow(s) it with authority to 'sue and be sued,' " it is presumed in the absence of an express limitation on the waiver that the agency is suable for claims arising out of the commercial relationships which it enters into in pursuit of its statutory mission.10 Since the basis of appellant's claim against the Secretary is HUD's collaboration with East Harlem and its participation in the Taino Towers project, which HUD clearly undertook "in carrying out" the purpose of § 1715z-1, the suit falls within the statutory waiver of sovereign immunity which, of course, is not the same as saying that appellant has a valid claim.  See Trans-Bay, supra, 179 U.S.App.D.C. at 190, 551 F.2d at 376; Bennett Construction, supra, 433 F.Supp. at 831.11


25
For a claim to be against the Secretary, and therefore within the scope of the "sue and be sued" clause, as opposed to a suit against the United States, any judgment for plaintiff must be out of funds in the control of the Secretary as distinguished from general Treasury funds.  Burr, supra, 309 U.S. at 250, 60 S.Ct. 488.  This requirement is satisfied if the judgment could be paid out of funds appropriated under the National Housing Act and in the control or subject to the discretion of the Secretary.  See 12 U.S.C. § 1702; Burr, supra, 309 U.S. at 250, 60 S.Ct. 488; United States v. American National Bank, 443 F.Supp. 167, 170-71 (N.D.Ill.1977).  Since the availability of funds to satisfy any judgment for appellant meets these criteria, the present suit must be treated as one against the Secretary and thus satisfying the "sue and be sued" clause, even though it would not be paid out of funds originally and specifically earmarked for the Taino Towers project.12


26
Since appellant disclaims reliance on a theory that it is entitled to payment as a third-party beneficiary of the building loan agreement between East Harlem and the mortgagee, we turn directly to what may liberally be construed as its claim in quantum meruit.  Upon this appeal from a summary dismissal, the evidence in support of that claim must be viewed in the light most favorable to appellant.  Hence we assume for purposes of our decision that appellant did not materially breach the construction contract.13


27
To sustain a claim of unjust enrichment a plaintiff must show that the defendant has at the plaintiff's expense been enriched and unjustly so, such as when the defendant receives requested goods or services without paying any compensation therefor.  See Palmer, I Law of Restitution, § 1.7, at 41 (1978); Restatement of Restitution, § 1 (1937).  In such a case the party who has conferred the benefit may assert a quantum meruit or quasi-contract claim against the recipient and seek a money judgment coupled with such restitutionary relief as may be appropriate as a matter of equity under the circumstances, including but not limited to an equitable lien on the subject matter in issue.  In the words of Judge Cardozo the "equity of the transaction must shape the measure of the relief," Beatty v. Guggenheim Exploration Co., 225 N.Y. 380, 389, 122 N.E. 378, 381 (1919); see Palmer, Supra, §§ 1.4, 20.  Indeed, restitution may even be awarded to a party even though he is in default under the contract, Amtorg Trading Corp. v. Miehle Printing Press & Mfg. Co., 206 F.2d 103, 105 (2d Cir. 1953); Schwasnick v. Blandin, 65 F.2d 354, 357 (2d Cir. 1933); Palmer, supra, §§ 5, 567-684; 5A Corbin on Contracts, §§ 1122, 3 (1964).


28
Although HUD is not technically the owner of a § 236 project, it is "enriched" by the goods and services provided by the contractor.  See Trans-Bay, supra, 179 U.S.App.D.C. at 195-96, 551 F.2d at 381-82; Eversley, supra, 409 F.Supp. at 798-99; Bennett Construction, supra, 433 F.Supp. at 835-36.  By virtue of the assignment of the mortgage to it, HUD acquires an equitable interest in the project.  In addition, the building represents the fruition of an effort by HUD to carry out the Congressional directive to make available low-cost housing to individuals and families of modest means.  Although HUD administers the § 236 program through local bodies, the dependence of these entities on HUD for both construction financing and rent subsidies demonstrates that § 236 is primarily a program for federal public housing.  It is HUD's involvement in the planning, development, and operation of the project and the public function of the completed structure itself which differentiates § 236 projects from other construction made possible by federally insured-mortgages, such as thousands of private homes.14 Thus, under § 236 HUD assumes almost all the indicia of actual ownership except the status of title holder of record.15


29
The Secretary does not seriously dispute that HUD is enriched by the contractor's services in a sense that would normally give rise to a quantum meruit claim for materials and services worth more than the amount paid, i. e., for the retainages or holdbacks.16 Nor does the Secretary argue that HUD has not been enriched simply because of failure to receive a completed structure, as distinguished from the structures received by it in the Eversley/Trans-Bay cases, which had been completed (except for that in Spring Construction, supra ).  While the benefit received by HUD from an incomplete structure is less than it would be if appellant had completed its contract work, HUD has nonetheless received a benefit in the form of goods and materials worth 10% More than the amounts paid to appellant.  We are unaware of any doctrine in the law of restitution precluding a nonbreaching party from recovering for the value of goods and services provided pursuant to an uncompleted contract on the ground that that party had not fully performed.


30
Rather, the Secretary's contention is that appellant's claim to the "undisbursed mortgage proceeds" is by agreement of the parties subordinated to the Secretary's right to apply these funds towards completion of the project.  Accordingly, the Secretary takes the position that, irrespective of the extent to which a benefit has been conferred upon HUD by appellant, HUD is not liable because it has a superior claim to the proceeds purportedly representing the unjust enrichment.  This contention assumes (1) that appellant's quantum meruit claim, even if sustained, would be recoverable only out of a specific fund of money attributable to the initial construction loan, and (2) that this fund is rendered immune from assessment to satisfy appellant's claim by the provision in the building loan agreement (to which appellant was not a party) giving the mortgagee the right upon the owner's default to use the undisbursed loan proceeds to pay for completion of the project.  Neither of these assumptions appears to be justified by the record as it now stands in the present case.


31
With respect to the first of the foregoing assumptions that a judgment upon the quantum meruit claim for unjust enrichment may be enforced only against a specific fund of money attributable to the construction loan the availability of a remedy to appellant is not dependent upon the existence of undisbursed loan proceeds as a Res that may be subject to an equitable lien.  If appellant should succeed at trial in establishing its claim of unjust enrichment, it would be awarded a judgment for the amount owed, Palmer, supra, § 1.1 (p. 4), Restatement of Restitution, §§ 4, 21 (1937), and the court, in the exercise of its broad equity power, could grant such restitutionary relief as might be equitable under the circumstances.  An equitable lien represents but one of several methods which courts in law and equity have devised to remedy unjust enrichment, see Restatement of Restitution, §§ 4(d), 18 (1937); Palmer, supra, §§ 1.1, 1.5.17


32
The notion that the claim here for unjust enrichment may not be asserted in the absence of proof of an identifiable Res arising from the unjust enrichment, i. e., specific undisbursed mortgage proceeds, apparently stems from American Fidelity Ins. Co. v. Construcciones Werl, supra, 407 F.Supp. at 183 (D.V.I.1975), a case involving a suit by a surety who completed construction of a § 236 project against HUD, the mortgagee by assignment, for undisbursed loan proceeds.  There the court held that the surety, by completing the HUD project, became entitled to enforcement of the contractual provision obligating the lender to disburse the mortgage proceeds upon completion of the building,18 and granted the surety's request for enforcement of this claim by imposing an equitable lien on the mortgage proceeds in HUD's custody.  See407 F.Supp. at 180-83.  The parties all proceeded solely with respect to the mortgage proceeds as the subject matter of a contractual obligation running from the mortgagee to the surety as third-party beneficiary of the building loan agreement, which provided that the claim should be satisfied out of the undisbursed mortgage proceeds as security for the obligation, and the case did not involve any claim other than that with respect to the specific proceeds.19 Subsequent cases have seemingly assumed that an equitable lien on the mortgage proceeds is the exclusive means of enforcing a claim by a contractor (or his surety) for restitution based on unjust enrichment, see Spring Construction, supra, 562 F.2d at 937; Trans-Bay, supra, 179 U.S.App.D.C. at 196, 551 F.2d at 382; Eversley, supra, 409 F.Supp. at 799.  This has led some to conclude erroneously in our view that when no specific fund of undisbursed mortgage proceeds is nominally in existence, the contractor is precluded from recovery, even though HUD has been unjustly enriched.  See Marcus Garvey Square, supra, 595 F.2d at 1131.20


33
The Secretary's second assumption that appellant's right to an equitable lien based on unjust enrichment is precluded by the provisions of the building loan agreement giving the mortgagee the right upon the owner's default to use the mortgage proceeds to pay for completion of the project is premised on the erroneous basis that the "mortgage proceeds" are limited to the original loan amount.  Paragraph 9 of the building loan agreement, however, provides that if the mortgagee should take possession and complete construction of the project upon default of the owner, "(a)ll sums . . . expended by the Lender (to complete the project in substantial compliance with the drawings and specifications) shall be deemed to have been paid to the Borrower and secured by the Mortgage."  Since HUD succeeds to Chemical as "Lender," see p. 6, Supra, the aggregate of "mortgage proceeds" is not a fund limited by the original loan amount but is a fluid sum limited only by the amount of money Congress has made available to the Secretary for use on an individual § 236 project, see Sutton v. United States, 256 U.S. 575, 41 S.Ct. 563, 65 L.Ed. 1099 (1921), and by the Secretary's willingness to commit such funds to a particular project.  Any payment to a contractor in excess of the amount retained by the Secretary to complete construction increases Pro tanto the aggregate mortgage proceeds.  Consequently, recognition of the contractor's claim for restitution based on quantum meruit or unjust enrichment is not inconsistent with the Secretary's right to apply additional "undisbursed mortgage proceeds" towards completion of the project.


34
Even if P 9 of the building loan agreement were construed to limit the term "mortgage proceeds" to the original loan amount, the provision would not govern appellant's right on this record to recover on a quantum meruit theory based on unjust enrichment.  The purpose of P 9 of the building loan agreement is to establish that upon default by the owner-borrower the lender can take whatever steps it deems necessary to protect its security, including completion of construction, on the borrower's account.  Without such a clause a borrower who abandoned the project prior to completion might assert that further advances by the lender to complete construction or to take other measures to salvage its security were committed solely at the lender's risk.


35
If the contractor here were suing as a third-party beneficiary of the building loan agreement, claiming that it was subrogated to the borrower's right Under the loan agreement to the loan proceeds, it might well be subject to any defenses which the lender would have against the borrower (except to the extent that a defect in the borrower's performance was cured by the third-party beneficiary, i. e., by completing the building, see American Fidelity, supra, 407 F.Supp. at 182-83).  In such event, if the building were left incomplete and the borrower were in default, P 9 of the building loan agreement would presumptively defeat the borrower's (and hence the contractor's) right to advancement of the loan proceeds.  But where the contractor does not simply seek to enforce rights under the building loan agreement, a provision in that agreement setting forth the respective rights and obligations of the parties thereto does not bar a third-party, such as appellant, from enforcing unjust enrichment rights not based on that contract.


36
In light of the foregoing, the Secretary's contention that appellant is precluded from recovery on a quantum meruit theory because the Secretary has priority in use of the undisbursed loan proceeds is not persuasive.  First, the availability of a remedy for appellant is not dependent on the existence of such proceeds as a Res to be subject to an equitable lien.  But even if it were so limited the contractor is not precluded from obtaining a money judgment for the amount owed and such equitable relief as may be appropriate.  Palmer, I Law of Restitution, §§ 1.1, 4 (1978).  Second, the Secretary's payment of the contractor's claim in restitution does not deny the Secretary the right to expend mortgage proceeds or other funds appropriated for the purpose to complete construction.  It does, of course, compel the Secretary to increase the outlay for Taino Towers but this would be the unfortunate consequence of mismanagement on the part of East Harlem or HUD and not the fault of Silberblatt, which must be treated on this appeal as an innocent contractor that has fully performed its obligations under its building contract with the HUD-procured, HUD-sponsored, non-profit, assetless owner.


37
This leaves the question of whether appellant should be estopped from seeking restitution from the Secretary because appellant, like all contractors on § 236 projects, knowingly bound itself to construct a building for an impecunious entity without recourse to attachment of the structure to secure payment for its performance.  It certainly appears that appellant must have been aware when it contracted with East Harlem that the latter's ability to pay for Taino Towers was wholly dependent on the advancement of mortgage proceeds and that in the event of default by East Harlem the mortgagee would be entitled to shut off this flow of money.  Appellant is not a small unsophisticated firm with no realistic choice but to do business on the terms dictated to it.  It was presumably capable of evaluating the risks of contracting with East Harlem and decided the risk did not outweigh the potential value of the contract to it.  On the other hand, if appellant, despite the formal contractual structure erected by HUD in an effort to insulate itself from liability, was in fact doing business with HUD's creature, East Harlem, at least since the assignment of the mortgages to HUD, justice would dictate that the rather transparent veil created by HUD be pierced to permit a decision based on substance rather than form.


38
This issue, which is the nub of the case before us, has in the past been resolved in favor of the contractor.  Trans-Bay And Eversley stand for the proposition that HUD cannot avoid paying for a benefit received by it as the real party in interest by maintaining a formal distinction between itself and its robot, the project owner who is the nominal party to the contract with the contractor, and by inserting a no-lien clause into the contract form prepared by HUD, a form which may well not be subject to negotiation.  See 179 U.S.App. D.C. at 195-96, 551 F.2d at 381-82; 409 F.Supp. at 796-99.  We realize that in these two cases (Trans-Bay And Eversley ), as well as in all but one of the cases subscribing to their holdings, the contractor had completed construction, thus removing any possible contention by the Secretary that HUD was entitled to refuse to pay the contractor for work performed because it needed the funds to complete construction itself.  But the contractor's claim for quantum meruit is no less valid because it was unable, due to the actions of the owner, the mortgagee, and HUD itself, to give HUD the full benefit for which it, through the project owner, had bargained.


39
Appellant's rights should not be cut off because (as we must assume on this appeal) it was ousted before it had a chance to complete performance.  Although recognition of the potential validity of appellant's claim may escalate the already inflated cost of Taino Towers and the Secretary, throughout the troubled history of this project, was undoubtedly pursuing in good faith the laudable goal of providing decent housing at a price which impoverished families can afford, we cannot on that account sacrifice the interests of a private party to a government project.  Assuming that appellant's factual contentions are correct, many of the complications afflicting the Taino Towers project would have been avoided if Chemical had not acted with unnecessary speed in the assignment of its rights as a virtually risk-free lender to HUD or HUD had allowed appellant to complete construction and paid it its due while it sought to resolve matters with East Harlem.  As an innocent non-breaching party the contractor should have the opportunity to prove its claim of unjust enrichment and, if successful, to obtain a money judgment to be satisfied through an equitable lien on any available undistributed "mortgage proceeds" (as that term is used in the construction loan agreement), to which an equitable lien may attach, or out of any funds which the Secretary is authorized by Congress to use for the purpose.


40
For the foregoing reasons appellants must be accorded their day in court and the opportunity to prove not only that Silberblatt was wrongfully removed from the project but that HUD was unjustly enriched as a result of Silberblatt's performance prior to its being terminated by East Harlem.  Our decision does not imply that if Silberblatt should succeed in establishing a claim for unjust enrichment it would be entitled to its damages for breach of contract.21 Ordinarily an award of restitution based on unjust enrichment, unlike contract damages, is not designed to put the aggrieved party in the position where he would have been if the contract had been performed but to restore him to the Status quo ante, regardless of the contract price or rate.  Indeed restitution may exceed or be less than contract damages, Palmer, Supra, § 4.4; see, e. g., United States v. Zara Contracting Co., 146 F.2d 606 (2d Cir. 1944); United States v. Western Casualty and Surety Co., 498 F.2d 335 (9th Cir. 1974),22 and in this case would be governed by federal common law, Trans-Bay,  supra, 179 U.S.App.D.C. at 191, 551 F.2d at 377 and cases cited therein, rather than by general common law.  Although we recognize that the issue of damages will not arise unless and until appellants prove their claim of quantum meruit based on unjust enrichment, we mention the subject for the reason that since appellants allege and argue that they are owed nearly $10 million our silence might otherwise be misconstrued.  In short, our holding that appellant may pursue a claim of unjust enrichment against HUD does not suggest that the Secretary has thereby breached or caused a breach of the owner's contractual obligation to Silberblatt.


41
Turning to appellant's claim that the trial court abused its discretion in denying appellant leave to amend its complaint as against Chemical Bank, appellant argues that Judge Pollack erred in asserting that the Bank would be severely prejudiced if appellant were allowed to assert an entirely new claim against it after the parties other than the Bank had engaged in "extensive discovery for over two years." 460 F.Supp. at 599.  We agree with appellant.


42
Leave to amend a complaint "shall be freely given when justice so requires," Fed.R.Civ.P. 15(a), and if the plaintiff has at least colorable grounds for relief, justice does so require unless the plaintiff is guilty of undue delay or bad faith or unless permission to amend would unduly prejudice the opposing party.  Foman v. Davis, 371 U.S. 178, 182, 83 S.Ct. 227, 9 L.Ed.2d 222 (1962); Clay v. Martin, 509 F.2d 109, 113 (2d Cir. 1975).  While the record does not reveal the reason for appellant's delay in determining why Chemical declared East Harlem in default under the loan agreement, it is not suggested that appellant acted in bad faith or with dilatory motives in seeking leave to amend when it did.


43
Chemical contends that it would suffer undue prejudice if the amendment were allowed because of the effort it would have to make to catch up to the other parties in discovery.  The record before us does not indicate how extensive the discovery actually was prior to the district court's decision granting the motions for summary judgment.  Appellant maintains that discovery was modest inasmuch as the litigation had been held in abeyance during most of the period of two years and several months since its commencement, due to tripartite settlement negotiations between Silberblatt, East Harlem, and HUD.  In any event, even if Chemical's estimate that it would need several months to analyze all the discovery material is correct, this by itself is insufficient prejudice to deny leave to amend, particularly when trial has not yet commenced and is not likely to do so for some time.  See Middle Atlantic Utilities Co. v. S.M.W. Development Corp., 392 F.2d 380, 386 (2d Cir. 1968); Smith v. Guaranty Service Corp., 51 F.R.D. 289, 293 (N.D.Calif.1970).23


44
Chemical also argues that leave to amend was properly denied because the claim which appellant seeks to assert against it is clearly specious, in light of various documents which Chemical has discovered, a contention made by Chemical in the district court in opposition to appellant's motion for leave to amend but not addressed by Judge Pollack in his decision.  A trial court does not abuse its discretion in denying leave to amend a complaint which even as amended would fail to state a cause of action.  Freeman v. Marine Midland Bank-New York, 494 F.2d 1334, 1338 (2d Cir. 1974).  But where, as here, the alleged futility of the amendment rests on findings of fact we prefer to let the district court resolve the factual issues.  If the documents referred to by Chemical are as decisive as it claims, a question on which we express no opinion, the only prejudice it suffers from allowing appellant to amend is the inconvenience and expense of submitting these documents in support of a motion for summary judgment.  This burden, or the burden of undertaking discovery, which Chemical would have shouldered had the proposed amendment been incorporated in the complaint as originally filed, hardly amounts to prejudice outweighing the policy of Rule 15(a) in favor of permitting the parties to obtain an adjudication of the merits.


45
For the foregoing reasons we reverse the denial of appellant's motion for leave to amend its complaint and remand the case to the district court for further proceedings consistent with this opinion.



1
 For other decisions bearing on the issue see Marcus Garvey Square, Inc. v. Winston Burnett Construction Co., 595 F.2d 1126 (9th Cir. 1979); Spring Construction Co. v. Harris, 562 F.2d 933 (4th Cir. 1977); Trans-Bay Engineers & Builders, Inc. v. Hills, 179 U.S.App.D.C. 184, 551 F.2d 370 (D.C. Cir. 1976); United States v. Mill Association, Inc., 480 F.Supp. 1 (E.D.N.Y.1979); Bronson & Popoli, Inc. v. Enoch Star Restoration Housing Development Fund Co.  (unpublished) (E.D.N.Y. Dec. 22, 1978); F.W. Eversley & Co. v. East New York Non-Profit H.D.F.C., Inc., 409 F.Supp. 791 (S.D.N.Y.1976); American Fidelity Fire Insurance Co. v. Construcciones Werl, Inc., 407 F.Supp. 164 (D.V.I.1975); Travelers Indemnity Co. v. First National State Bank, 328 F.Supp. 208 (D.N.J.1971)


2
 Judge Pollack also granted summary judgment for the Secretary as third-party defendant in claims brought by Silberblatt in some thirty-odd cases brought against Silberblatt by its sub-contractors


3
 Payments under mortgage insurance commitments entered into by the Secretary are drawn from a Special Risk Insurance Fund established under 12 U.S.C. § 1715z-3


4
 Separate loans and construction contracts were executed for each of the four towers.  The documents for each tower vary only in the amounts of money involved and in some technical matters.  In this opinion we treat the corresponding documents for each tower as one integrated instrument


5
 The discrepancy between the loan documents and construction contract regarding completion deadlines was apparently inadvertent


6
 Section 1442 provides in pertinent part:
"(a) A civil action or criminal prosecution commenced in a State court against any of the following persons may be removed by them to the district court of the United States for the district and division embracing the place wherein it is pending:
"(1) Any officer of the United States or any agency thereof, or person acting under him, for any act under color of such office or on account of any right, title or authority claimed under any Act of Congress for the apprehension or punishment of criminals or the collection of the revenue."


7
 The agreement also provided, Inter alia, for modification of the mortgage and mortgage note to enable East Harlem, as owner, to operate the project on a sound financial footing when completed


8
 Evidently this motion was served on Chemical, since Chemical's reply memorandum in support of its motion for dismissal, filed June 16, 1978, responds to Silberblatt's motion for leave to amend


9
 See note 6, Supra.  We thus need not address the question of whether jurisdiction exists under federal question jurisdiction.  See Trans-Bay, supra, 179 U.S.App.D.C. at 191-92, 551 F.2d at 377-78


10
 The issue in Burr was whether the statutory waiver of immunity applied to a particular form of action, a garnishment action, rather than whether it applied to a theory of recovery.  If anything, the reasoning of Burr that a "sue and be sued" clause makes a governmental agency "amenable to judicial process" to the same extent that "a private enterprise (would be) under like circumstances," 309 U.S. at 245, 60 S.Ct. at 490, leaves even less room for an assertion that the waiver excludes certain causes of action than for an assertion that it excludes certain types of process


11
 We do not find the decision in Modular Technics Corp. v. South Haven Houses Housing Development Fund Co., 403 F.Supp. 204 (E.D.N.Y.1975), Aff'd mem., 538 F.2d 311 (2d Cir. 1976), to be controlling in the present case.  The issue here is not whether the Secretary became a de facto party to a construction contract without authority to do so, but what contractual or restitutional obligations may be imposed upon the Secretary for authorized acts committed to carry out the provisions of subchapter II of the National Housing Act
The Secretary argues that whether or not the waiver of immunity covers appellant's contractual and quasi-contractual claims it does not apply to any tort claims subject to the Tort Claims Act, 28 U.S.C. §§ 2671, Et seq., citing § 2679(a), which provides that a sue and be sued clause does not authorize suit on claims subject to the Act.  Appellant's complaint appears at points to seek damages for the Secretary's alleged tortious interference with appellant's contract with East Harlem. 28 U.S.C. § 2680(h), however, excludes from the Tort Claims Act claims for interference with contract.  It could be argued that inasmuch as § 2680 provides that the Act does not apply to the enumerated types of claims, such as interference with contract, § 2679(a) does not apply to such claims either.  We rejected an argument essentially along these lines in Edelman v. FHA, 382 F.2d 594, 597 (2d Cir. 1967).  However, we need not decide the issue here, since appellant concedes that it could not assert tort claims in this action and abjures the assertion of such claims.


12
 To the extent that this conclusion is inconsistent with the ruling in Marcus Garvey, supra, 595 F.2d at 1131-32, we disagree with the view adopted by the Ninth Circuit in that case


13
 Ordinarily a party who has fully performed its contractual obligations sues on the contract rather than for restitution.  In cases like the present one, however, a suit on the construction contract would be futile since the debtor is judgment proof


14
 Assuming that construction contracts for private dwellings or other private structures financed by a federally insured mortgage do not contain a no-lien clause, the Government, as potential assignee of the mortgage, probably is subject to the claims of contractors to the extent that materialmen's and mechanic's liens take priority over the mortgage


15
 The various manifestations of HUD's control over § 236 projects are enumerated in prior decisions.  See Trans-Bay, Supra, 179 U.S.App.D.C. at 195-96, 551 F.2d at 381-82; Eversley, supra, 409 F.Supp. at 796-97


16
 As we have noted, the Secretary does dispute the actual value of the goods and services provided by appellant before it terminated work on the project


17
 The problem of identifying the source from which a potential judgment would be paid, in order to insure that the suit lies within the waiver of sovereign immunity of 12 U.S.C. § 1702, is distinct from that of locating a Res to which an equitable lien may be attached.  The former is resolved by a determination that the Secretary has control over some funds from which a judgment could be paid; the latter requires identification of a fund which is allocable by agreement or otherwise to satisfy the obligation
When the contractor sues as a third-party beneficiary to the loan agreement, the undisbursed loan proceeds constitute a Res which simultaneously makes the Secretary suable and provides the basis for the relief requested.  When the contractor sues in quantum meruit, however, the monies that would be used to satisfy a judgment may not necessarily be drawn from a fund which prior to the suit had been identified with the particular project which is the subject of the action.


18
 This contractual provision is a regulation, 24 C.F.R. § 221.512, applicable to § 236 projects by virtue of 24 C.F.R. § 236.1 and incorporated by reference into the building loan agreement by operation of 24 C.F.R. §§ 207.254, 236.251


19
 Although the court in American Fidelity referred to imposition of the equitable lien as a means of preventing HUD from enjoying unjust enrichment, 407 F.Supp. at 183-84, and even expressly stated that the surety was entitled to recover for quantum meruit, Id. at 184, the lien on mortgage proceeds was employed to effectuate the parties' agreement rather than as merely the most convenient way to secure payment of the surety's claim for quantum meruit.  The court appeared to reject the surety's contention that HUD received the benefit of the construction and therefore was "enriched" by the goods and services provided by the surety, Id. at 177-78.  Moreover, the cases cited by the court in support of its conclusion that the mortgage proceeds were subject to an equitable lien, United States v. Adamant Co., 197 F.2d 1 (9th Cir.), Cert. denied, 344 U.S. 903, 73 S.Ct. 283, 97 L.Ed. 698 (1952); Jamison Coal & Coke Co. v. Goltra, 143 F.2d 889 (8th Cir.), Cert. denied, 323 U.S. 769, 65 S.Ct. 122, 89 L.Ed. 615 (1944), involved an effort to impose an equitable lien Based on an alleged agreement to apply a specifically designated fund as security for a debt


20
 In Marcus Garvey the court found that the absence of undisbursed mortgage proceeds denied the court jurisdiction because there was no fund within the Secretary's control from which a judgment could be satisfied.  This necessarily implies that in the court's view the only possible source for payment of the contractor's claim for quantum meruit was the undisbursed mortgage proceeds


21
 Appellant's complaint seeks nearly $10 million, consisting of the "balance due" under the contract (about $450,000), the accrued retainages ($3.4 million), damages for defendants' failure to make timely payments ($4.6 million), the value of materials ordered and available for the project ($300,000), and the balance due for allegedly approved change orders ($1.2 million)


22
 The Court of Claims has applied this rule in a suit for restitution against the federal government.  Acme Process Equipment Co. v. United States, 347 F.2d 509, 171 Ct.Cl. 324 (1965), Rev'd on other grounds, 385 U.S. 138, 87 S.Ct. 350, 17 L.Ed.2d 249 (1966)


23
 In view of the foregoing, we need not consider appellant's argument that the denial of the leave to amend was wrongful because even though appellant had sought leave to amend it was still entitled to amend as a matter of course, Chemical not having filed a responsive pleading at the time of appellant's motion.  The few authorities on point have divided on the question of whether a party forfeits the right to amend of course when it unnecessarily moves for leave to amend.  Compare Vars v. Int'l Bro. of Boilermakers, 204 F.Supp. 245, 246 (D.Conn.1962); In re Watauga Steam Laundry, 7 F.R.D. 657, 658-59 (E.D.Tenn.1947) (right to amend of course forfeited), with La Batt v. Twomey, 513 F.2d 641, 650-51 (7th Cir. 1975); Kirk v. United States, 232 F.2d 763, 770 (9th Cir. 1956); Peterson Steels, Inc. v. Seidmon, 188 F.2d 193, 194 (7th Cir. 1951); Magic Foam Sales Corp. v. Mystic Foam Corp., 167 F.2d 88, 91 (6th Cir. 1948); Rogers v. Girard Trust Co., 159 F.2d 239 (6th Cir. 1947) (right to amend of course not forfeited)


