This is an appeal from a judgment in favor of the executors of one corporate creditor against another corporate creditor whose right to receive payment was made subordinate to that of plaintiffs’ testate. Two questions are presented:
1. Did the subordinated creditor have the right to discharge an unma-tured subordinated indebtedness without the consent of the senior creditor?
2. Was there payment of a matured, subordinated debenture when the subordinated creditor took the note of the debtor’s parent corporation instead of cash?
Litigation between the parties has now been in progress for fifteen years, and three opinions of the District Court have been reported. Buchman v. American Foam Rubber Corp., 250 F.Supp. 60 (S.D.N.Y.1965); First National Bank v. American Foam Rubber Corp., 306 F.Supp. 593 (S.D.N.Y.1969); First National Bank v. American Foam Rubber Corp., 309 F.Supp. 547 (S.D.N.Y.1969).1 Repetition will not improve upon the recitals of fact contained in these opinions, and we will therefore review only so much background as is necessary to frame the issues on this appeal.
Prior to 1957, appellees’ testate, Samuel Buchman, was president and a substantial stockholder of American Foam Rubber Corp. (AFR), a New York corporation. On May 17, 1957, Buchman resigned and sold his interest in AFR and its affiliate, Burlington Holding Corporation, to appellants. As part of the agreement of sale, certain debentures of the two corporations, maturing in 1960 and 1965, which were held by appellants, *452were subordinated to debentures held by Buchman. The pertinent portion of the subordination agreement reads as follows:
To induce Samuel Buchman to sell his capital stock hereunder, Marie Louise deMontmollin and Alexander F. Pathy hereby agree with respect to the debentures of each of said corporations that the rights of any holder (including her or him) of the debentures thereof now held by her or him and referred to above, be subordinated to the rights of any holder or holders of the debentures thereof now held by Samuel Buchman (including him) as to the payment of interest and principal. No claim for interest under the debentures so subordinated shall be made unless all interest payable on the debentures now held by Samuel Buch-man shall have been paid in full, and no claim for principal under any of the debentures so subordinated shall be made unless the entire principal of all the debentures now held by Samuel Buchman shall have been paid in full.
If for any reason, either corporation shall pay interest or principal on said debentures to any of the Buyers, or to any person deriving title to the debentures of said corporation from any of the Buyers, and said payment shall be made without first satisfying the priority to which the holder or holders of Samuel Buchman’s debentures are entitled by reason of the foregoing provisions, the amount or amounts of the payment so made to the Buyer (or to the person deriving title from her or him) shall be promptly paid by such Buyer to said holder or holders of Samuel Buchman’s debentures.
A similar agreement of subordination was made with respect to some corporate promissory notes which were held by the parties.
In 1958, AFR decided to issue new stock for the purpose of improving its capital structure; and, over a period of time, appellant deMontmollin surrendered subordinated AFR debentures and notes with a face value of $322,000 for preferred stock with an equivalent face value.
On April 1, 1960, the Burlington debentures became due. Buchman was paid in cash for his, and Mrs. deMont-mollin received a credit on Burlington’s books for $15,000, the amount of her debentures. She immediately loaned this money to AFR, receiving a promissory note in return.2 This was accomplished by a bookkeeping transfer of assets from Burlington to AFR; no money passed through appellants’ hands.
On February 21, 1961, AFR was adjudicated a bankrupt. In its opinion, 306 F.Supp. 593, 601, the District Court stated that, if Mrs. deMontmollin had not surrendered the $322,000 in debentures and notes, appellees, because of their right to priority in payment under the subordination agreement, would have been entitled to recover the bankruptcy dividends payable on these obligations. It therefore held appellant deMontmollin liable for the amount of the dividend which would have been paid. The District Court also held that the transaction involving the $15,000 Burlington debentures constituted payment of those debentures within the meaning of the subordination agreement and that appellant deMontmollin was liable for this amount. Id. at 607.
We reverse the holding of the District Court insofar as it predicates liability upon the exchange of the AFR debentures and notes for stock and affirm its holding insofar as it predicates liability upon the payment of the Burlington debentures.
The Exchange Transaction
Before examining the District Judge’s theory of liability, we first note our approval of his rejection of an alternate theory which had been proposed by plaintiffs. Judge Cooper held that the exchange of debentures and notes for preferred stock did not constitute payment of these obligations, as that term was used in the subordination agreement, since no assets of the corporation passed into the creditors’ hands. 306 *453F.Supp. at 599. Neither, he said, was the issuance of stock the first step in a plan to secure payment, since AFR was precluded by other contractual provisions from paying dividends or redeeming stock. Id. at 600. We find no error in these holdings. [2-4] Judge Cooper’s theory of liability was that appellant had breached an implied provision in the subordination agreement that the subordinated debt would not be discharged.3 He stated that the subordinated debt was “a type of security for the senior debt, available *454to the senior creditor upon a distribution of the assets of the debtor” and might therefore be regarded as a “cushion” or “support” for the senior debt. 306 F.Supp. at 599. Although he then specifically refused to determine the true nature of the interest, “if any”, created in favor of the senior creditor, he held that, in the absence of provisions to the contrary, it was a breach of the subordination agreement for the junior creditor to discharge the subordinated debt. Id. at 606. We disagree.
The subordination agreement provided in substance that neither interest nor principal should be paid on the subordinated debt unless the interest and principal on the senior debt were paid in full and that, if such payments were made, they would be promptly paid over to the senior creditor. Clearly, the senior creditor had both equitable and contractual rights in the proceeds of such payments. Similar rights would attach to dividends declared in the estate of the bankrupt creditor. In re Credit Industrial Corporation, 366 F.2d 402 (2d Cir. 1966); Calligar, Subordination Agreements, 70 Yale L.J. 376, 383 (1961).
Various theories have been advanced to support the enforcement of subordination agreements in bankruptcy: equitable lien, equitable assignment, constructive trust and enforcement of contractual rights. In re Itemlab Inc., 197 F.Supp. 194, 197 (E.D.N.Y.1961); Calligar, supra, 70 Yale L.J. at 384; Leiby, Enforcement and the U.C.C., 23 Bus. Lawyer 57 (1967). This Circuit has favored the recognition of priorities based upon the “lawful contractual arrangement between the parties.” In re Aktiebolaget Kreuger & Toll, 96 F.2d 768, 770 (2d Cir. 1938). As we stated in In re Credit Industrial Corporation, supra, 366 F.2d at 407, if the terms of the contract are unambiguous, there is no need to resort to “strained theories of third-party beneficiary, estoppel or general princi-pies of equity” to determine the rights of the parties.
Since most of the decisions in this area have dealt with the priority of payments in bankruptcy, there has been little need for the courts to explore the rights of the parties beyond those which attach to the bankruptcy dividends. The rules which have been laid down in these cases are not, therefore, determinative of the senior creditor’s pre-bankruptcy rights, if any, in the payment which has not yet accrued or the dividend which has not been declared, i. e., in the debt itself.4 To justify the judgment in favor of plaintiffs below, they must have had rights, rights of such nature that they precluded defendant’s good faith discharge of the subordinated debt.
No recital of such rights can be found in the contractual arrangement between the parties. The terms of the subordination agreement are unambiguous and include no prohibition against discharge of the subordinated indebtedness. Moreover, based upon our decision in Cherno v. Dutch American Mercantile Corporation, 353 F.2d 147 (2d Cir. 1965), we see no equitable basis for holding that a prohibition should be implied.
The facts in Cherno are not dissimilar from those we are now considering. There, the subordinated creditor discharged a chattel mortgage which he held as security, in order that the debtor could mortgage the property to a third party. In denying the senior creditor’s claim that it was a preferred lien creditor as an equitable assignee or equitable lienholder, we held that the usual subordination agreement simply gives priority or precedence of lien right and debt payment to the senior creditor and does not constitute an assignment of the subordinated debt. Id. at 151. We also rejected the senior creditor’s claim of a security interest in the debt. In so doing, we anticipated the provisions of § 1-209 of the N.Y. Uniform Commercial Code, en*455acted the following year.5 Finally, we held that the senior creditor was not the beneficiary of a constructive trust, because the subordinated creditor was not being unjustly enriched by holding property in which the senior creditor had an interest.
In denying the existence of an equitable lien in, or equitable assignment of, the subordinated debt, we were following rules of law well established in both the New York and Federal courts. Generally, these courts have held that an agreement to pay out of a particular fund does not create an equitable lien upon the fund or operate as an equitable assignment thereof. East Side Packing Co. v. Fahy Market, 24 F.2d 644, 645 (2d Cir. 1928); Union Trust Co. v. Townshend, 101 F.2d 903 (4th Cir.), cert. denied, 307 U.S. 646, 59 S.Ct. 1044, 83 L.Ed. 1526 (1939); B. Kuppenheimer & Co. v. Mornin, 78 F.2d 261, 264 (8th Cir.), cert. denied, 296 U.S. 615, 56 S.Ct. 135, 80 L.Ed. 436 (1935); Cabell v. Markham, 69 F.Supp. 640, 642 (S.D.N.Y.1946), aff’d sub nom. Cabell v. Clark, 162 F.2d 153 (2d Cir. 1947); People ex rel. Balbrook Realty Corp. v. Mills, 295 N.Y. 190, 195, 66 N.E.2d 50 (1946). To accomplish an assignment, the would-be assignor must relinquish control over the fund. The test is whether there is “an appropriation of the fund so that the debtor would be justified in paying the debt or the assigned part to the person claiming to be the assignee.” Hinkle Iron Co. v. Kohn, 229 N.Y. 179, 183, 128 N.E. 113, 114 (1920); In re Conoley, 50 F.Supp. 542 (S.D.N.Y.1942).
Whatever may have been the situation with regard to payments due and owing to Mrs. deMontmollin, we think it clear from the foregoing authorities that Mr. Buchman, as senior creditor, had no equitable rights as assignee or lienholder in the debt itself. Thomas v. New York and Greenwood Lake Rwy. Co., 139 N.Y. 163, 178, 34 N.E. 877 (1893). AFR, the debtor, had no right to pay any part of the unmatured debt to Mr. Buchman, the senior creditor.
It is interesting to note that this .was the specific holding of the court in In re Dodge-Freedman Poultry Co., 148 F.Supp. 647 (D.N.H.1956), aff’d sub nom. Dodge-Freedman Poultry Co. v. Delaware Mills Inc., 244 F.2d 314 (1st Cir. 1957) (per curiam), relied upon by the court below. That case involved the waiver by a subordinated creditor of a bankruptcy dividend and the preservation of such dividend for the senior creditor through the doctrine of constructive trust. The court said, 148 F.Supp. at 651:
In the case at bar, there was no manifestation of intention, either written or oral, or by conduct, on the part of Freedman [the subordinated creditor] to relinquish control, or to make any appropriation to Delaware Mills, Inc. [the senior creditor]. Therefore, no equitable assignment was created, nor is there an equitable lien.
Judge Cooper quite correctly recognized, on the basis of our decision in Cherno, that plaintiffs could claim no rights as beneficiaries of a constructive trust, since Mrs. deMontmollin never had any property in her possession in which plaintiffs had any equitable interest. 306 F.Supp. at 603 n. 38. Having thus rejected appellees’ last possible equitable claim, it is not surprising that Judge Cooper would “intimate no view on the ‘true nature’ of the interest created, if any.”6 Id. at 606.
*456Judge Cooper’s reliance upon a statement in Cherno that the subordinated creditor breached the subordination agreement when it discharged a chattel mortgage given to it as collateral, is, we think, misplaced. That statement was dictum. Moreover, the proof in Cherno showed that the collateral was discharged subsequent to default by the insolvent debtor on both the subordinated debt and the senior indebtedness, while an action to recover on the latter was pending. We described it as part of a “scheme” to get additional cash from an innocent lender. 353 F.2d at 149.
The discharge of the subordinated indebtedness in the instant case occurred before its maturity and three years prior to the debtor’s bankruptcy. There is no claim of any “scheme” or bad faith and no contention that the discharge was made in contemplation of bankruptcy. Nonetheless, Judge Cooper determined in 1969 that the discharge constituted a breach of the subordination agreement and then waited five years until the termination of the bankruptcy proceedings in 1974 to compute the amount of plaintiffs’ damages. Only in this way could he ascertain the amount of the “double dividend” which he said plaintiffs lost.7
It requires little imagination to conceive of the discharge of a subordinated debt many years prior to bankruptcy, or, indeed, without any subsequent bankruptcy ever taking place. If the decision appealed from is correct, such discharge would nonetheless be a breach of the subordination agreement, because of the remote chance that bankruptcy might someday occur and the senior creditor might thereafter be deprived of a double dividend.8 We think that if the senior creditor would prohibit a discharge because of such remote contingencies, he should so provide in the subordination agreement.
We hold, therefore, that appellees’ testate had no equitable or contractual rights in the unmatured obligations which prevented appellant from discharging them in good faith.
The Loan Transaction
Appellant’s argument that the loan transaction was simply a series of bookkeeping entries between parent and subsidiary corporation was properly rejected by the District Court. Where a creditor takes the bill, note or check of a third party instead of insisting upon performance to the letter of his contract with the debtor, a reasonable inference may sometimes be drawn that the primary obligation has been paid and discharged. Hamilton v. R. S. Dickson & Co., 85 F.2d 107 (2d Cir. 1936); 70 C.J.S. Payment § 29 (1951). Judge Cooper was entitled to find that when, upon the maturity of the Burlington debentures, Mrs. deMontmollin released that company from its indebtedness and took an AFR note in substitution therefor, this was payment of the debentures within the meaning of the subordination agreement. Moreover, although no money passed through appellant’s hands, the effects of the transaction, as Judge Cooper held, were the same as if it had.
Plaintiffs were entitled to recover the amount of this payment by virtue of the specific provisions of the subordination agreement. This being so, we need not consider appellant’s equitable defense of lack of clean hands, based on Mr. Buch-man’s allegedly improper conduct in other matters involving AFR.
We affirm that portion of the judgment appealed from which is based on the payment of the $15,000 in Burlington debentures and reverse that portion based upon the discharge of the $322,000 in AFR debentures and notes, with costs of the appeal to appellant, and remand *457to the District Court for judgment in accordance with this decision.
. The pertinent opinion for purposes of this appeal is reported at 306 F.Supp. 593.
. Appellants claim that Judge Cooper abused his discretion by basing his decision on an implied provision not to discharge the indebtedness because that theory was not pleaded by any of the parties and contradicted previous rulings by the court that allegedly limited the issues to be tried. While these allegations would provide sufficient grounds for reversal if Judge Cooper had, as implied by appellants, raised and resolved issues sua sponte that prejudiced appellants, see United Transportation Union v. State Bar of Michigan, 401 U.S. 576, 91 S.Ct. 1076, 28 L.Ed.2d 339 (1971); Reynolds v. Stockton, 140 U.S. 254, 266, 11 S.Ct. 773, 35 L.Ed. 464 (1891), in this instance Judge Cooper was entitled to consider the claim of the loss of a “double dividend” in bankruptcy.
On May 9, 1967, Judge Cooper issued an opinion denying defendants’ motion for summary judgment on the subordination claim. Judge Cooper defined the “plain meaning” of the subordination agreement as prohibiting defendants “from realizing any cash or its equivalent from the corporation until Buchman’s debentures had been satisfied in full.” Judge Cooper indicated that the Exchange Transactions would not violate the subordination agreement thus defined unless it constituted “a first step in a plan to obtain cash — or cash realizable property — from the corporation.” It was to decide this latter question that Judge Cooper proceeded to trial.
After a three-day trial to the court in December 1968, Judge Cooper rendered his decision on July 23, 1969. With respect to the Exchange Transaction, he held that the discharge of the debentures and receipt of the preferred stock did not constitute “payment” within the meaning of the subordination agreement. 306 F.Supp. at 599-600. Judge Cooper also determined that the exchange was not a first step in a plan to obtain cash that could constitute a breach of the agreement under the May 9, 1967, interpretation. Nevertheless, the judge concluded that the Exchange Transaction breached the agreement because it deprived Buchman of his “double dividend” in bankruptcy. Since Judge Cooper had indicated in his opinion of May 9, 1967, that the subsequent trial would be limited to the question of whether the Exchange Transaction constituted the first step in a plan to obtain cash, appellants forcefully argue that appellees were restricted by the law of the case to a recovery on the issue of premature payment. Thus, appellants argue, once the district court found no
such payment, the inquiry should have ended and judgment should have been entered on their behalf.
Our reading of the record reveals that the “double dividend” theory was not based on an issue or on facts that the parties did not have the opportunity to litigate at trial and that Judge Cooper’s consideration of the issue did not unduly prejudice appellants. At an early point during the first day of the trial, appellees offered evidence bearing on AFR’s status in bankruptcy in order to prove the amount of the dividend that Buchman would have received in bankruptcy had appellants’ debentures not been exchanged for stock. Appellees also noted that they had advocated this theory of recovery throughout the pretrial proceedings, and this point was not denied by appellants. Thus, it appears that appellants were fully apprised of the “double dividend” issue both prior to and during the trial and could have introduced evidence to the effect that the parties never intended the subordination agreement to cover the parties’ rights in bankruptcy, had that indeed been the understanding. No such evidence was offered.
The fact that the relief requested in the pleadings did not include the lost dividend would not preclude Judge Cooper from granting relief on that theory. The pleadings recited all the facts relevant to the Exchange Transaction and appellants cannot have been surprised by the evidence proffered at trial. Once the issue was raised at trial, Judge Cooper was entitled to grant relief on a theory not pleaded by any party but relying on pleaded and proven facts. See United States ex rel. Bergen Point Iron Works v. Maryland Casualty Co., 384 F.2d 303, 304 (2d Cir. 1967); Fed.R. Civ.P. 54(c); 10 C. Wright & A. Miller, Federal Practice and Procedure § 2664, at 104-05 (1973).
Nor can we say that Judge Cooper’s May 9, 1967, decision irrevocably bound him not to consider the parties’ rights in bankruptcy at the subsequent trial. In this Circuit, the law of the case is a discretionary doctrine that need not be applied when no prejudice results from its omission. See Dictograph Products Co. v. Sonotone Corp., 230 F.2d 131, 135 (2d Cir.), appeal dismissed, 352 U.S. 883, 77 S.Ct. 104, 1 L.Ed.2d 82 (1956). Since appellants were on notice both prior to and during the trial that appellees would request judgment on the basis of the dividend lost as a result of the Exchange Transaction, the appellants did not suffer prejudice or surprise such as to render
*454it improper for the district court to reach that question.
. Burlington had become a wholly owned subsidiary of AFR in 1958.
. “Cases in this area are not helpful in solving the question of whether the subordination, if it is a lien or assignment, is a lien or assignment of the note itself or of certain rights arising by virtue of the note.” Zinman, Under the Spreading UCC-Subordinations and Article 9, 7 B.C.Ind. & Com.L.Rev. 1, 25 n. 81 (1965).
. N.Y. Uniform Commercial Code § 1-209 (McKinney Supp.1975) provides:
An obligation may be issued as subordinated to payment of another obligation of the person obligated, or a creditor may subordinate his right to payment of an obligation by agreement with either the person obligated or another creditor of the person obligated. Such a subordination does not create a security interest as against either the common debtor or a subordinated creditor. This section shall be construed as declaring the law as it existed prior to the enactment of this section and not as modifying it.
. A determination of the “true nature” of plaintiffs’ equitable rights cannot be avoided by adopting the concept of implied contract. “[I]mplied contract is a term used to define those situations and conditions which make it equitable and just in applying the equity powers of the court to establish and declare a lien where otherwise there might be no relief.” *456James v. Alderton Dock Yards, Ltd., 256 N.Y. 298, 303, 176 N.E. 401, 403 (1931).
. Since we are reversing that portion of the judgment in which these damages are awarded, we need not consider appellant’s argument that the procedure followed by the District Court was improper.
. A breach under these circumstances would create interesting problems concerning the computation of damages and the running of the statute of limitations.
*459In contrast, the other subsections of § 230 require a one year waiting period, or none at all, under circumstances not present here.