
86 B.R. 768 (1988)
In re DENBY STORES, INC., Debtor.
Robert M. FISHER, as Trustee of Denby Stores, Inc., Plaintiff,
v.
The OUTLET COMPANY, United Department Stores, Inc., et al., Defendants.
Bankruptcy No. 82 B 10154 (TLB), Adv. No. 86-5148A.
United States Bankruptcy Court, S.D. New York.
May 5, 1988.
As Corrected May 16, 1988.
*769 *770 *771 Bertram Goldstein, New York City, Special Counsel to Trustee.
Latham & Watkins by Robert J. Rosenberg, David G. Smith, New York City, for The Outlet Co.

DECISION AND ORDER ON MOTIONS FOR PARTIAL SUMMARY JUDGMENT
TINA L. BROZMAN, Bankruptcy Judge.
Robert M. Fisher, chapter 7 trustee (Trustee) of Denby Stores, Inc. (Denby), requests partial summary judgment on his eighth cause of action in this adversary proceeding and on his objection to the proofs of claim filed by The Outlet Company (Outlet).

I.
On January 25, 1982, Denby filed a petition for relief under chapter 11 of the Bankruptcy Code (the Code). The reorganization was not successful; on June 28, 1983 the case was converted to chapter 7. The Trustee was soon after appointed.
The instant dispute has its genesis in two leases, one of which related to property in Colonie, New York (the Colonie Lease). R.I. Associates (Associates), the lessor, in a sale and leaseback arrangement entered into in May, 1980, granted Denby the use of the premises from September 29, 1980 through January 31, 2006 at a yearly rental of $282,000. To facilitate the arrangement, Outlet, Denby's corporate parent, guaranteed payment to Associates of all sums owed by Denby under the Colonie Lease (the Guaranty). The Guaranty further provided that Outlet's obligation would not be impaired or released other than by complete performance of the obligations by Denby and, specifically, would not be affected by Denby's bankruptcy. Additionally the Guaranty provided that Associates could demand payment of Outlet at any time without prior demand on or pursuit of Denby.
By letter dated July 29, 1982, Denby surrendered the leased premises to Associates. Although the Trustee contends that all rent and then use and occupation payments were made through January 31, 1982, Outlet disputes this assertion, contending that none of the required payments was made at any time subsequent to closing. The parties are agreed that no use or occupancy was paid after January 31, 1982.
In September, 1982, Bankers Life Company (Bankers Life), as assignee of Associates, sued Outlet for breach of its obligations under the Guaranty, seeking $6,768,000 in damages (the Bankers Life Action). The Bankers Life Action was resolved in March 1984 when Outlet paid *772 Bankers Life $3,178,473.52 in return for releases from Bankers Life and Associates.
The second lease was for premises in Hadley, Massachusetts (the Hadley Lease). The lessor was the Pyramid Company of Hadley (Pyramid). The term of the Hadley Lease was to have been June 15, 1979 through June 30, 1994 at a base monthly rental of $13,920.53 plus additional charges for taxes and maintenance.
Outlet's involvement with the Hadley Lease was somewhat different than with the Colonie Lease. In September 1980, Outlet agreed to sell Denby to United Department Stores, Inc. (UDS). According to Outlet, the existence of the Colonie Lease was important to UDS and an inducement to the closing of the sale. Not so the Hadley Lease. Prior to the closing Outlet informed Pyramid that UDS would not assume the Hadley Lease. Pyramid promptly sued Denby and Outlet (the Pyramid Action) alleging that Outlet induced or caused Denby to repudiate its lease and that Outlet tortiously interfered with Pyramid's contractual relationship with Denby. As a result of the commencement of the Pyramid Action, Outlet and UDS restructured their agreement. Denby retained the Hadley Lease; the purchase price for Denby was reduced by $1.2 million; and Outlet executed a note in favor of Denby in the same amount, $1.2 million (the Note). On November 15, 1980, the sale closed.
Two years later, in November, 1982, Pyramid moved this court to compel Denby to assume or reject the Hadley Lease and to fix the value of Denby's use and occupation for the post petition period. On December 22, 1982, the court approved a stipulation deeming the Hadley Lease rejected and fixing Pyramid's administrative claim at $65,000. Outlet settled the claims against it in the Pyramid Action by payment of $5,000 to Pyramid on February 7, 1984. A further stipulation, approved by this court in January, 1986, settled Pyramid's administrative claim against Denby at 38% and eliminated Pyramid's unsecured claim.
Anticipating that it would be called upon to make payments to Pyramid and Bankers Life, Outlet in January, 1984, filed two proofs of claim against Denby's estate, an unliquidated administration claim (# 575) "in the nature of indemnity or subrogation" for any post-petition use and occupancy that it might be called upon to pay in connection with its Guaranty and an unliquidated unsecured claim (# 576) "in the nature of indemnity or subrogation" concerning any amounts it might be called upon to pay for (i) a breach or rejection of the Colonie Lease and (ii) any loss suffered as a result of the Pyramid Action. After paying Pyramid and Bankers Life as detailed above, Outlet filed in December 1985 two amended proofs of claim to fix the amount of the indebtedness and clarify the section of the Code pursuant to which it seeks relief. Claim # 651 amends # 575. Although filed in Outlet's name, it provides that Outlet is subrogated to Bankers Life and seeks pursuant to section 509(a) $141,000 paid for post-petition use and occupancy. Claim # 652 amends # 576. It, too, is filed in Outlet's name and provides that Outlet is subrogated to Bankers Life and Pyramid. The claim seeks pursuant to section 509(a) $3,178,473.52 for Outlet's payment to Bankers Life and $5,000 for Outlet's payment to Pyramid.
On February 28, 1986 the Trustee sued Outlet and a number of other defendants. His complaint was later amended. His eighth claim for relief seeks recovery of the entire $1.2 million plus interest due to Denby from Outlet pursuant to the Note. Outlet's answer contains several affirmative defenses including Outlet's entitlement to (a) $3,183,473.52 based on the theory of recoupment and (b) recovery of the amounts it paid with respect to the Hadley and Colonie Leases based on the theories of setoff, indemnity, subrogation, guarantee, contract and the common law. The Trustee has moved for partial summary judgment on his eighth claim and on Outlet's affirmative defenses pursuant to Fed.R. Civ.P. 56 and Fed.R.Bankr.P. (Rule) 7056 as well as on Outlet's proofs of claim.

II.
Summary judgment is appropriate only when the moving party has met his *773 burden of proving that there are no unresolved factual disputes that relate to an issue which is material to the outcome of the litigation.[1]Corselli v. Coughlin, 842 F.2d 23, 25 (2d Cir.1988). All ambiguities must be resolved and all reasonable inferences must be drawn in favor of the party against whom summary judgment is sought. Schiess-Froriep Corp. v. S.S. Finnsailor, 574 F.2d 123, 126 (2d Cir.1978); Knight v. U.S. Fire Insurance Co., 804 F.2d 9, 10-11 (2d Cir.1986), cert. denied, ___ U.S. ___, 107 S.Ct. 1570, 94 L.Ed.2d 762 (1987). The court's function is not to resolve disputed issues of fact, but rather only to determine whether there is a genuine issue of fact to be tried. Eastman Machine Co., Inc. v. United States, 841 F.2d 469 (2d Cir.1988) citing Anderson v. Liberty Lobby, Inc., 477 U.S. 242, 106 S.Ct. 2505, 2509-11, 91 L.Ed.2d 202 (1986); Knight v. U.S. Fire Ins. Co., 804 F.2d at 11.
A. Objection to Claims
The Trustee contends that claim # 576 is a direct claim against the Denby estate which must be disallowed as a matter of law pursuant to section 502(e)(1)(C)[2] because Outlet later filed a claim for subrogation pursuant to section 509 of the Code. The argument that claim # 576 must be deemed to be an unallowable direct claim under section 502 flows from two facts, that the claim was not filed in the name of the creditor and that it was filed prior to the bar date, not 30 days after expiration of the time for the creditor to file its claim. The court disagrees with the Trustee's analysis.
Outlet filed claim # 576 in its own name prior to the bar date. The claim described in detail the facts giving rise to Outlet's then contingent claim against Denby and described the nature of Outlet's rights against Denby, specifically "indemnity or subrogation." Outlet did not state the section of the Code under which it could recover from Denby, and in fact the language it used could have applied either to sections 502 or 509. Later, after the bar date had passed and the liability had been fixed, Outlet amended claim # 576 to liquidate the amount of its claim and to assert the specific section of the Code under which it could recover from Denby. The court concludes that Outlet asserted a timely claim for subrogation, not that Outlet filed a timely direct claim which must be disallowed under section 502(e)(1)(C) by virtue of Outlet's having later filed an untimely claim for subrogation.[3]
The first sentence of Rule 3005(a) indicates that an entity liable with the debtor or may file a claim if the creditor has not filed one pursuant to Rule 3002 or 3003(c), and that the debtor's claim should be filed within 30 days after the expiration of the applicable time set for filing claims. The thrust of the rule is salutary; it is meant to ameliorate the harsh effect on a codebtor where a creditor decides to forego participation in the debtor's estate in favor of simply pursuing the solvent codebtor. See 3 L. King, Collier on Bankruptcy, ¶ 509.02 at 509-5 (15th ed. 1988). Although the rule *774 could arguably be read, as the Trustee suggests, to preclude a codebtor from filing a claim before a bar date, the court finds no reason for refusing to recognize the codebtor's claim once the bar date has passed and the creditor has not filed a claim. Accord 8 L. King, Collier on Bankruptcy ¶ 3005.03 at 3005-4 (15th ed. 1988) ("there is no reason why a claim filed before the bar date by a codebtor should not be recognized once the bar date is passed.") In fact, this seems the most logical reading when considering the last sentence of Rule 3005(a) which contemplates that the codebtor and the creditor may both have claims filed at the same time. If the codebtor's claim filed prior to the bar date were never to be recognized, there would be no reason to provide for the order of priority.
Moreover, it would be an absurd elevation of form over substance not to recognize a codebtor's claim solely because it was filed too early, when in fact it was filed prior to the expiration of the bar date. Particularly where the creditor did not file a proof of claim, the claim of the codebtor filed prior to the bar date should be allowed. Since neither Associates nor its assignee, Bankers Life, filed a proof of claim, so much of Outlet's claim # 576 as related to the Colonie Lease should escape dismissal on the grounds that it was prematurely filed.
Unlike Associates and Bankers Life, Pyramid filed both administrative and general unsecured proofs of claim. Outlet has not disputed that Pyramid had an administrative claim which was fixed at $65,000 and later settled at 38%, nor that the unsecured claim was eliminated based on an agreement between Pyramid and Denby. Ordinarily, where the creditor filed a timely proof of claim, it should supersede the earlier filed claim by the codebtor asserted by virtue of the codebtor's subrogation to the creditor. And, indeed, Rule 3005 so provides. But where the creditor settles with the debtor, accepting less than the full distribution to which it might be adjudged entitled, and additionally receives payment on the debtor's liability to it from the codebtor, the codebtor's earlier filed subrogation claim should not be disallowed merely because the creditor had filed a proof of claim. Thus Outlet should not be prohibited from asserting Pyramid's claim to the extent of the payment which Outlet made in partial satisfaction of Denby's liability.[4] Partial summary judgment therefore cannot be granted on the basis that Outlet's claim was superseded.
Rule 3005 requires an entity which seeks subrogation to file a claim in the creditor's name, if known. But if the creditor is unknown, the rule permits filing in the entity's own name. While it may have been bad form for Outlet not to file in Pyramid's name, Denby was on notice by the plain language in claim # 576 that Outlet sought subrogation. There can be no valid claim of surprise or prejudice. As the Trustee himself acknowledges, the defect is a technical one which is curable by an amendment. Athens Stove Works v. Fleming (In re Boggs-Rice Co.), 4 F.Supp. 431 (W.D.Va.1933), rev'd on other grounds, 66 F.2d 855 (4th Cir.1933); 3 L. King, Collier on Bankruptcy ¶ 57.21 at 371 (14th ed. 1977). Further, principles of equity dictate "that substance will not give way to form [and] that technical considerations will not prevent substantial justice from being done." Pepper v. Litton, 308 U.S. 295, 305, 60 S.Ct. 238, 244, 84 L.Ed. 281 (1939).
The Trustee continues his argument by attacking the timeliness of the amended claim # 652. He contends that claim # 652 cannot amend claim # 576 because it asserts a different and distinct claim. Thus he concludes that the amended claim must be disallowed because a claim for subrogation must be filed within the time frame set forth in Rule 3005(a) (that is within 30 days after the expiration of the last day fixed for filing claims). The Trustee's focus is misplaced. The real issue is whether Outlet could properly amend its proof of claim. It is well established that an "amendment *775 to a claim is freely allowed where the purpose is to cure a defect in the claim as originally filed, to describe the claim with greater particularity or to plead a new theory of recovery on the facts set forth in the original claim." United States v. International Horizons, Inc. (In re International Horizons), 751 F.2d 1213, 1216 (11th Cir. 1985), citing, Szatkowski v. Meade Tool & Die Co. (In re Meade Tool & Die Co.), 164 F.2d 228, 230 (6th Cir.1947); In re G.L. Miller & Co., 45 F.2d 115 (2d Cir.1930); see also In re W.T. Grant Co., 53 B.R. 417, 420 (Bankr.S.D.N.Y.1985). The original proof of claim set forth in detail the factual basis for Outlet's claim. The amended claim did precisely what is permitted; it liquidated the amount sought by Outlet and clarified the statutory authority for the claim.
Alternatively, the Trustee urges that the payments to Bankers Life for which reimbursement is sought were made by Outlet as a volunteer for the purpose of settling a lawsuit, and not pursuant to its liability under the Guaranty. His conclusion is predicated entirely on the following language contained in both releases: "Associates [or Bankers Life Company] understands that this settlement is in compromise of doubtful and disputed claims and it is not to be construed as an admission of liability on the part of the persons, firms or corporations hereby released, by each of whom liability is expressly denied." Further, the Trustee argues that the $141,000 of use and occupation for which Outlet asserts an administration claim is a claim arising against the debtor-in-possession for use of the premises post-petition and was not a contractual claim arising under the lease. Finally, the Trustee alleges that Outlet failed to make a showing that any monies were in fact due from Denby to Pyramid for a breach and concludes that this payment, too, was made for the sole purpose of settling a lawsuit, rather than to satisfy any liability of Denby to Pyramid. The Trustee therefore urges that he is entitled, as a matter of law, to disallowance of Outlet's claims.
Dealing first with the payment to Bankers Life, Outlet responds that the language in the releases was included to prevent any unforeseen or foreseen collateral use of the settlement agreements by third parties, and should not be relied upon for a finding that its payment was not on account of a liability to Associates or Bankers Life. In addition, Outlet urges that the obligation for post-petition rent was contemplated and incorporated into the Guaranty. Outlet was responsible for any lease payments irrespective of Denby's bankruptcy and, thus, all monies flowing from Outlet to Bankers Life were paid in connection with Outlet's obligation under the Guaranty. Outlet argues that there is a clear factual dispute as to whether the payments were made pursuant to the Guaranty, precluding summary judgment.
Outlet's claims were filed based upon rights in the nature of subrogation pursuant to section 509(a).[5] The doctrine of subrogation enables one who pays the debt of another to stand in the shoes of the latter party and assert whatever rights that party held. Pearlman v. Reliance Ins. Co., 371 U.S. 132, 137, 83 S.Ct. 232, 235, 9 L.Ed.2d 190 (1962). It applies where a party pays a debt or discharges an obligation for some type of liability rather than voluntarily, see Miller v. Concord-Liberty Savings & Loan Assoc. (In re Miller), 72 B.R. 352, 353 (Bankr.W.D.Pa.1987); In re Bugos, 760 F.2d 731 (7th Cir.1984) and for which another is primarily liable. Rubenstein v. Ball Bros., Inc. (In re New England Fish Co.), 749 F.2d 1277, 1282 (9th Cir.1984). Moreover, a party cannot assert subrogation for paying his own debt. In re Glade Springs, Inc., 47 B.R. 780 (Bankr. E.D.Tenn.1985), aff'd 826 F.2d 440 (6th Cir. 1987); Ridge v. Smothers (In re Smothers), 60 B.R. 733 (Bankr.W.D.Ky.1986).
That Outlet was secondarily liable pursuant to the Guaranty is certain. The import *776 of the releases is not, however, so clear. Outlet is not a signatory to either of the releases and thus is not bound by the characterization used by the releasors. Equally important, the language of the releases merely indicates that the settlement is not to be "construed" as an admission of liability. The documents are not free from ambiguity. Where the documents on which a motion for summary judgment are predicated are ambiguous, a factual issue is presented which may not be summarily resolved, even if both parties move for summary judgment. Bank of America National Trust & Savings Association v. Gillaizeau, 766 F.2d 709 (2d Cir.1985). It would be inappropriate to hold that as a matter of law Outlet's payment of $3,178,473.52 to settle the lawsuit was not a payment under Outlet's Guaranty, for that would require the court to draw inferences from the documents which are adverse to the party against whom summary judgment is sought and would constitute an impermissible exercise in fact finding. See 48th Street Steakhouse, Inc. v. Rockefeller Group, Inc., (In re 48th Street Steakhouse), 835 F.2d 427, 430 (2d Cir.1987), petition for cert. denied, ___ U.S. ___, 108 S.Ct. 1596, 99 L.Ed.2d 910 (1988).
Turning to the remainder of Outlet's pre-petition claim, the facts underlying the $5,000 payment to Pyramid are sketchy. The Trustee's argument that the payment by Outlet was for Outlet's primary liability for its tortious interference is undercut by the fact that the Pyramid Lease was apparently not breached by Denby at the time of the sale of Denby to UDS. This tends to suggest that Outlet settled the Pyramid Action during the bankruptcy case because of some perceived liability of Denby for which Outlet was secondarily liable.[6] Accordingly, although the Trustee may well prove correct at a trial of the matter, summary judgment is not appropriate.
The Court rejects the theory that the $141,000 paid to the Colonie landlord for Denby's post-petition use and occupancy was not encompassed by the Guaranty and is not recoverable by Outlet. Pursuant to case law under the Bankruptcy Reform Act of 1978 (prior to the 1984 amendment), even though the statute did not specifically so provide, lessors were entitled to the reasonable value of the leased property pending a decision to assume or reject a lease. In re Wheeling-Pittsburgh Steel Corp., 54 B.R. 385, 391 (Bankr.W.D.Pa. 1985); In re Sweetwater, 40 B.R. 733, 745 (Bankr.D.Utah 1984), aff'd, 57 B.R. 743 (D.Utah 1985), 2 L. King, Collier on Bankruptcy ¶ 365.03[2], at 365-24 to 365-25 (15th ed. 1982). Thus, Denby was responsible for making post-petition payments prior to its assumption or rejection of the Colonie Lease. Because Outlet made these payments, it may seek to assert the landlord's claim for the $141,000. Thus, the Trustee's motion for summary judgment on the objection to claim # 575, as amended by claim # 651, must be denied.
B. Setoff
The Trustee asks the court to rule that, as a matter of law, Outlet's claims, if allowable, may not be offset against Outlet's debt to Denby pursuant to section 553 of the Code.[7]
Setoff is only available where there exists a mutuality of obligation between *777 the debtor and creditor. This requires that both obligations be held by the same parties, in the same right or capacity, and arise from pre-petition obligations. In re Mastroeni, 57 B.R. 191 (Bankr.S.D.N.Y. 1986); In re O.P.M. Leasing Services, Inc., 68 B.R. 979, 986 (Bankr.S.D.N.Y.1987). The debt and the claim need not arise from the same transaction, nor must they be of the same character. See Elsinore Shore Associates v. First Fidelity Bank, N.A. (In re Elsinore Shore Associates) 67 B.R. 926, 936 (Bankr.D.N.J.1986); Braniff Airways, Inc. v. Exxon Co., U.S.A., 814 F.2d 1030, 1035 (5th Cir.1987).
The Trustee contests Outlet's ability to set off its claims on a variety of theories discussed below. First, the Trustee urges that Outlet has come to this court with "unclean" hands by having failed to mention the Note in its proofs of claim and having allegedly misstated the facts concerning payments under the Colonie Lease. Good faith is a peculiarly factual inquiry rarely susceptible to summary determination. Outlet argues that its silence about the Note was justified because of its belief that there was a failure of consideration which precluded any supposition of liability against it on the Note. The issue is factual and the facts are disputed. Similarly disputed is whether Denby fulfilled any of its obligations under the Colonie Lease. As such, it is inappropriate to determine that as a matter of law the doctrine of setoff is unavailable because Outlet has unclean hands. See Eastman Machine Co., 841 F.2d at 473.
The Trustee next argues that Outlet waived its right to setoff by stating in the proofs of claim that they were not subject to any right of setoff or counterclaim and by failing to assert its right of setoff in them. He relies on the case of In re Butler, 61 B.R. 790 (Bankr.S.D.Fla.1986) which states a general rule that a creditor will be deemed to have waived his right of setoff if he files a proof of claim in bankruptcy without asserting the right. Id. at 791, citing 3 L. King, Collier on Bankruptcy 553.07 n. 1 (15th ed. 1985). The Trustee, however, acknowledges that there are exceptions to the general rule, specifically, where the failure to assert the right was due to a good faith mistake of fact and did not prejudice the debtor. In re Sound Emporium, Inc., 48 B.R. 1 (Bankr.W.D. Tex.1984), aff'd, 70 B.R. 22 (W.D.Tex.1987). In Sound Emporium, the creditor filed its proof of claim within the statutory period and asserted that no offsets were available. Later it learned that funds it held were available for setoff, and it amended its proof of claim to reflect a setoff. The court held that the creditor made a good faith mistake and the debtor did not detrimentally rely on the original proof of claim.
It is certainly possible that the good faith exception is available to Outlet inasmuch as it claims to have had no liability on the Note available to be set off. Determination of that issue must await trial.[8]
In an argument which distorts the ordinary principles of bankruptcy law, the Trustee urges that setoff is unavailable because Outlet's claim against Denby respecting the Colonie Lease arose post-petition when the monies were paid pursuant to the agreement of settlement rather than prior to bankruptcy when the Guaranty was executed, thereby destroying mutuality. The Trustee's argument ignores the fundamental precept that the filing of a bankruptcy petition effects a cleavage, with the condition of the estate being assessed as of the filing date. Everett v. *778 Judson, 228 U.S. 474, 479, 33 S.Ct. 568, 569-570, 57 L.Ed. 927 (1913); see also Andrews v. Partridge, 228 U.S. 479, 33 S.Ct. 570, 57 L.Ed. 929 (1913). When the guarantor pays the creditor's claim, he succeeds to it by way of subrogation. The landlord's claim for damages from the rejection of the lease is deemed a pre-petition claim by virtue of section 502(g), 11 U.S.C. § 502(g). Thus, the guarantor's claim must likewise be considered pre-petition.[9]
The Trustee's argument rests on two decisions, Cooper-Jarrett, Inc. v. Central Transport, Inc., 726 F.2d 93 (3d Cir.1984) and Stonitsch v. Waller (In re Waller), 28 B.R. 850 (Bankr.W.D.Mo.1983). The Cooper-Jarrett case is inapposite. Subsequent to the debtor's bankruptcy, he and a creditor negotiated and entered into a settlement agreement to resolve a lawsuit that had been commenced pre-petition. The creditor sought to set off its obligation pursuant to the settlement agreement with a pre-petition debt owed by the debtor to it. The court held that the settlement agreement was a post-petition obligation because it extinguished the legal rights the creditor sought to enforce through the litigation. Here, Outlet seeks to set off the pre-petition claim of the landlord to which it succeeded by subrogation. Moreover, it does not appear that Outlet's settlement with Bankers Life and Associates constituted a novation with the debtor, as was the case in Cooper-Jarrett. Denby's liability to Bankers Life and Associates was not compromised.[10] In other words, the liability was not one which sprung into existence only subsequent to bankruptcy.
The Trustee's reliance on Waller is misplaced for two reasons. First, the landlord in that case, who had not been paid in full by the guarantor, filed a proof of claim. The Waller court explained that its decision was predicated upon the possibility of a double recovery against the estate if the guarantor were permitted to set off the debt. Since the landlord here did not file a proof of claim, no such possibility exists. Second, as the Collier treatise notes, the Waller court based its decision in part on the finding of an agreement between the parties that, upon dissolution of the partnership, the debtor would receive its share of the partnership assets without regard to any other accounts between the partners. See 4 L. King, Collier on Bankruptcy, ¶ 553.04 at 553-26 n. 44 (15th ed. 1988).
The decision in In re Flanagan Brothers, Inc., 47 B.R. 299 (Bankr.D.N.J.1985) supports the notion that there are mutual debts such that Outlet may assert by way of setoff the landlord's claim to which Outlet is subrogated. See also 4 L. King, Collier on Bankruptcy, ¶ 553.11 at 533-51 (15th ed. 1988) ("[w]here the situation involves payment by a surety subsequent to the principal's bankruptcy, the allowance of the surety's claim is subject to special rules, but a similar result [allowing a setoff] could be reached if the claim on the obligation has been paid and the surety therefore has an allowed claim arising from payment." Footnotes omitted.); Moorefield v. Perlman (In re Monex Corp.), 43 B.R. 879 (Bankr.S.D.Fla.1984); Traders Bank v. Stonitsch (In re Isis Foods, Inc.), 24 B.R. 75 (Bankr.W.D.Mo.1982); Elsinore Shore Associates, 67 B.R. 926. In Flanagan, a general contractor who was a surety was permitted upon payment to set off its entire debt to the debtor/subcontractor against the claim of a materialman who supplied goods to the debtor. The court reasoned that the surety would in effect have to pay the materialman's claim twice if the setoff were not permitted and the debtor would gain a windfall; the surety would have to pay the materialman directly and, if the setoff were not allowed, would also have to pay the debtor all sums owed to it, including the monies which the debtor *779 was liable to pay to the materialman. Similarly, if Outlet were permitted no setoff, it would have paid the landlord and would also have to pay Denby's Trustee the full indebtedness on the Note, without reduction for the amount paid to the landlord. Since the Colonie landlord filed no claim and is owed no money, Denby's Trustee would reap a windfall. The court concludes that Outlet's claim under the Guaranty arose pre-petition. Accordingly, Outlet is not precluded from setting off its pre-petition claim with its pre-petition liability on the basis that mutuality is lacking.
The Trustee also contends that Outlet is precluded from asserting any setoff because section 553(a)(1) excludes "the claim of [a] creditor against the debtor [if the claim] is disallowed other than under section 502(b)(3) of this title [11]." The Trustee urges that Outlet's claim is disallowed under section 502(e)(1)(C) because it is a section 502 claim and Outlet also asserted a claim under section 509. This has already been disposed of above by the determination that Outlet did not assert a section 502 claim.
Another argument posited by the Trustee is that Outlet is precluded from invoking the doctrine of setoff by reason of section 553(a)(2) which excludes a claim that "was transferred, by an entity other than the debtor, to such creditor- (A) after the commencement of the case . . ." The Trustee asserts that when Outlet paid the claim to Bankers Life, it received a "transfer" of the claim. The Trustee recognizes that at least one bankruptcy court does not agree with his analysis of section 553(a)(2), Flanagan Brothers Inc., 47 B.R. 299, but submits that the Flanagan court rewrote the provisions of subsection 553(a)(2).
What the court did in Flanagan was to construe section 553(a)(2) so as to implement congressional intention. The purpose of the statute was to prohibit trafficking in claims against the debtor in order to effect setoff (which would provide a windfall to both parties to the transfer at the expense of the estate). To apply subsection (a)(2) to prevent the guarantor or surety from setting off its claim would effectively require the guarantor or surety to pay twice, once when he is called upon to pay the creditor, and once when he is called upon to pay the debtor. This could not have been what Congress intended where the claim was acquired by the guarantor under a contract entered into more than 90 days prior to the bankruptcy. Accord 4 L. King, Collier on Bankruptcy, ¶ 553.08[2] at 553-41 (15th ed. 1988).[11]
Assuming that the payments to Pyramid and Bankers Life are determined to have been based on a liability of Outlet, and were not payments by a volunteer, the extent of the setoff available to Outlet must be ascertained. Outlet has paid a total of $3,042,473.55.[12] It seeks to set off this amount against the indebtedness due on the $1.2 million Note. Because Outlet asserts that it is subrogated to Bankers Life's and Pyramid's claims pursuant to section 509 of the Code, its claim is subordinated to those of Associates and Pyramid until they are paid in full, either through payments under Title 11 or otherwise. See section 509(c). Further, had Associates or Pyramid pressed claims against Denby, the amount each could recover would be limited by section 502(b)(6).[13]
*780 The Trustee asserts that Outlet should not be permitted to set off an amount greater than the dividend which the prime creditor would receive from the estate.[14] He relies on Hippodrome Bldg. Co. v. Irving Trust Co., 91 F.2d 753 (2d Cir.1937), cert. denied, 302 U.S. 748, 58 S.Ct. 265, 82 L.Ed. 578 (1937) and its progeny, including In re Schulte Retail Stores Corp., 105 F.2d 986 (2d Cir.1939); Fisher v. Lee Bros. Value World, Inc., 486 F.2d 1037 (9th Cir.1973); and In re Mammoth Mart, Inc., 1 Bankr.Ct.Dec. 1177 (Bankr.D.Mass. 1975). None of these cases considers whether a surety can set off a claim in an amount greater than the dividend which the prime creditor would receive. They focus, instead, on the statutory limitation of a landlord to recover from the estate under section 502(b)(6). Outlet, on the other hand, points to several cases which have permitted setoff where the surety's claim would be subordinate to the claim of other creditors, and the subordinated claim would not itself share in the dividends of the estate. See Rochelle v. United States, 521 F.2d 844 (5th Cir.1975), cert. denied, 426 U.S. 948, 96 S.Ct. 3168, 49 L.Ed.2d 1185 (1976); Hayden v. Standard Accident Ins. Co., 316 F.2d 598 (9th Cir.1963); In re Sound Emporium, Inc., 48 B.R. 1; Flanagan Bros., Inc., 47 B.R. at 302. The reasoning behind the two earlier cases was that section 68 of the former Bankruptcy Act which governed setoff permitted the doctrine to be used for mutual claims, except in certain specific instances, which specific instances did not include when the claim was subordinated. In the absence of such an exception, the courts declined to impose one.
The Flanagan court was directed to a New Jersey case which addressed the same issue on distinguishable facts. After reviewing the pertinent language in the New Jersey opinion, the Flanagan court found that it "evinces the court's belief that setoff would be allowed to the full extent of the [surety's] debt rather than limited by the size of the dividend the materialmen would have received. In fact, the very term `setoff,' . . . denotes a netting of mutual debts." 47 B.R. at 302, citing 4 L. King, Collier on Bankruptcy ¶ 553 (15th ed. 1984).
Although neither the Trustee nor Outlet raised this matter with the court, the facts of this case seemingly do not demand that the court determine whether a surety's or guarantor's claim subordinated to the claim of the debtor's creditor is available for offset. For here, the pre-petition claims are no longer subordinate. Although Pyramid did file a pre-petition claim, it later waived that claim as part of its settlement with the Trustee. Neither Bankers Life nor Associates ever filed any claims, having been paid by Outlet, as guarantor, more than 100% of the maximum claim which could have been allowed.[15] Thus there remains no liability of the estate to either landlord.
But even if the claims remained subordinated to the claims of the landlords, the court concludes that Outlet would be entitled to assert a right of setoff. A setoff is, in effect, a congressionally and judicially sanctioned preference. Section 553, with certain exceptions, permits setoff where it is available under non-bankruptcy law. See H.R.Rep. No. 595, 95th Cong., 1st Sess. 185 (1977), U.S.Code Cong. & Admin.News 1978, p. 5787; 4 L. King, Collier on Bankruptcy, ¶ 553.02 at 553-9 (15th ed. 1988). Since Congress explicitly set forth the exceptions to the right to set off mutual debts, the court would be remiss in engrafting *781 onto the statute a new exception for the subordinated claim of a guarantor or surety in the absence of some policy in non-bankruptcy law which would require that result.[16]
Having said all of that, the court must, however, reject Outlet's contention that it is entitled to set off the full amount of its payment regardless of the amount of Denby's liability to the landlords. The argument is facile, although momentarily plausible if one looks only to section 509(a), which subrogates the guarantor to the extent of his payment to the creditor. Outlet's right of setoff must be limited to the allowable claims of the landlords to which it is subrogated.
Subrogation is an equitable doctrine which enables a surety who pays the debt of another to assert the rights of the person he paid. Pearlman v. Reliance Ins. Co., 371 U.S. at 137, 83 S.Ct. at 235. He cannot assert any greater rights than the creditor in whose shoes he stands. Western Casualty and Surety Co. v. Brooks (In re Bruns Coal Co.), 362 F.2d 486, 491 (4th Cir.1966); Guinee v. Board of Supervisors (In re James R. Corbitt Co.), 62 B.R. 1017, 1022 (Bankr.E.D.Va.1986). "[T]he rights [and] claims . . . to which [the surety] succeeds are taken subject to the limitations, burdens, and disqualifications incident to them in the hands of the party to whom he is subrogated . . ." 73 Am Jur.2d, Subrogation, § 106 (1974).
If the landlord had an indebtedness to the estate which the Trustee were seeking to recover, pursuant to section 553(a)(1) the maximum amount of the setoff to which the landlord would be entitled would be its allowed claim, that is, its damages as limited by section 502(b)(6). Outlet, since it is subrogated to the claims of the landlords, can be entitled to no greater setoff. In other words, the guarantor's setoff is limited to the lesser amount of his payment or the creditor's allowed claim.[17]
C. Recoupment
Recoupment is a common law doctrine which arose as an equitable rule of joinder to avoid the necessity of bringing separate actions for two claims. It permits a defendant to defend against the plaintiff by asserting a countervailing claim that arose out of the "same transaction." See 3 J. Moore, Moore's Federal Practice ¶ 13.02 at 1313 (2 ed. 1985); 20 Am.Jur.2d, Counterclaim, Recoupment & Setoff, §§ 16-18 (1965). Instead of relating to mutual obligations arising from different transactions, recoupment is essentially a defense to the debtor's claim against the creditor. In re Monongahela Rye Liquors, 141 F.2d 864, 869 (3d Cir.1944). The doctrine has been employed in bankruptcy cases. See id.; In re Yonkers Hamilton Sanitarium Inc., 22 B.R. 427 (Bankr.S.D.N.Y.1982), aff'd, 34 B.R. 385 (S.D.N.Y.1983). The major consideration is whether the claims arise from the same transaction.
Outlet contends that it may invoke the doctrine of recoupment as an affirmative defense to the eighth cause of action, explaining that "the Note, executed in reduction of the purchase price of the overall transaction, and the payment by [it] stemming from breaches of the Colonie Lease obligations starting immediately on the date of the transfer, constitute elements of *782 the same transaction." Outlet Memorandum of Law in Opposition at 7.
The Trustee asserts that the Note, executed in consideration of performance on the Hadley Lease and the Guaranty executed in connection with the Colonie Lease and the UDS sale can in no way be construed as arising from a single transaction.
The term "same transaction" is not defined. Courts have permitted recoupment where but a single contract is involved. Generally, the cases have concerned an overpayment made to the debtor which the creditor sought to utilize to avoid its post-petition liability. See Waldschmidt v. CBS, Inc., 14 B.R. 309 (M.D.Tenn.1981) (recording company made advance royalties to the debtor and was permitted to recoup the advances from post-petition royalties); Yonkers Hamilton Sanitarium, 22 B.R. 427 (government overpaid Medicare allowances to debtor hospital and recouped from post-petition allowances due debtor); Ashland v. Petroleum Co. v. Appel (In re B. & L. Oil Co.), 782 F.2d 155 (10th Cir.1986) (buyer of crude oil overpaid debtor for pre-petition purchases and recouped that amount by post-petition purchases). Recoupment in executory contract cases is permitted to prevent a debtor from assuming the favorable aspects of a contract and rejecting the unfavorable burdens or obligations of the same contract. Yonkers Hamilton Sanitarium, 22 B.R. at 435, citing In re Shoppers Paradise, Inc., 8 B.R. 271 (Bankr.S.D.N.Y.1980). As explained in B. & L. Oil, recoupment should be allowed where to disallow it would result in unjust enrichment because the creditor did not consciously make a loan, extend credit or make payments required by a contract but paid the debtor by mistake. 782 F.2d at 159.
Two cases in which recoupment was denied are helpful to resolution of the parties' dispute. In Steinberg v. Illinois Department of Mental Health and Development Disabilities (In re Klingberg Schools), 68 B.R. 173 (N.D.Ill.1986), aff'd, 837 F.2d 763 (7th Cir.1988) (per curiam), a state agency contracted with the debtor to pay a per diem rate in return for the debtor's providing services to third parties. The federal government also began to provide funding to the debtor. When the state agency learned of the federal funding, it unilaterally reduced the per diem rate, effective retroactively, so that it had substantially overpaid the debtor. It sought to recoup these monies from post-petition amounts it owed the debtor. The court found the doctrine of recoupment unavailable because the state agency in fact sought to recoup payments made by a third party, the federal government. The court explained that "recoupment is a defense to assert that the claimant did not perform its part of the bargain and is not entitled to recover from defendant . . ." Id. at 180.
In Westinghouse Electric Corp. v. Fidelity and Deposit Co., 63 B.R. 18 (E.D.Pa. 1986) the creditor, a furniture supplier, entered into a contract with the debtor. Pursuant to the contract, the debtor would sell the property, bill its customers, and then pay the creditor after deducting the debtor's commission. When the debtor was behind in its payments to the creditor, the arrangement was restructured such that the creditor would bill the clients and pay the debtor its commission. Under this new arrangement, the creditor sought to recoup the unpaid bills by sending the debtor a smaller percentage commission. The court found that this was not a typical recoupment case because there had been no advance monies paid which the creditor sought to recoup. Moreover, "the reciprocal obligations of the parties clearly arose from different transactions. `The fact that the same parties are involved, and that a similar subject matter gave rise to both claims . . . does not mean that the two arose from the `same transaction'". Id. at 21, citing Lee v. Schweiker, 739 F.2d 870, 875 (3d Cir.1984).
Outlet's effort to push and tug its payment to Bankers Life on the Colonie Lease into the same transaction as Outlet's indebtedness to Denby on the Note is wholly unavailing. Outlet's payment to Bankers Life arose out of the Guaranty executed in May 1980. Its indebtedness to Denby on the Note, dated November 20, 1980, arose out of Outlet's restructuring of its proposed *783 sale of Denby to UDS to provide that UDS would assume the Pyramid Lease. The umbrella of the UDS sale is not available to encompass the different obligations which Outlet incurred to different entities. Drawing all reasonable inferences in favor of Outlet, the court cannot conclude that the Guaranty of the Colonie Lease and the execution of the Note constituted a single transaction with Denby.[18] Indeed, Denby was not a party to a contractual arrangement with Outlet but a corporation being sold by Outlet.
The facts are not like the cases in which recoupment has been allowed. There was no overpayment to Denby, mistaken or intentional. Denby had no contract with Outlet, only an obligation from Outlet. Outlet's contracts were with UDS, Associates and Pyramid.
There is a somewhat closer relationship between the Note given to Denby in consideration of UDS' assumption of the Pyramid Lease and a payment made by Outlet to Pyramid. But since the facts concerning the payment to Pyramid are so undeveloped the court cannot determine if recoupment would be available.
In conclusion, although recoupment of the money paid to Bankers Life is not available to Outlet, setoff may be, to the extent discussed above. The factual development of the Pyramid payment is insufficient to permit any conclusion with respect to Outlet's ability to utilize that payment as a defense. The Trustee has not shown that he is entitled to summary judgment on the Note or on his objections to Outlet's claims against the estate and his motion is therefore denied.
IT IS SO ORDERED.
NOTES
[1]  The Trustee has steadfastly maintained that Outlet bears the burden respecting its proofs of claim. He misperceives the nature of his own motion. Although Outlet bears the burden of persuasion at trial once the Trustee has rebutted its prima facie case, California State Board of Equalization v. Official Committee of Unsecured Creditors (In re Fidelity Holding Company, Ltd.), 837 F.2d 696, 697, (5th Cir.1988), the Trustee has moved for summary judgment on his objection to the proofs of claim. To prevail on that motion the Trustee bears the same burden as he does with respect to his motion for summary judgment on his eighth claim for relief.
[2]  Section 502(e)(1)(C) provides that the claim for reimbursement or contribution of a codebtor must be disallowed to the extent that the codebtor asserts a right of subrogation to the right of the creditor under section 509 of the Code.
[3]  The Trustee would have the court hold that if the amended claim were untimely, asserting a new claim for subrogation and having been filed more than 30 days after the bar date, the amended claim must nevertheless be considered valid for purposes of disallowing the timely filed direct claim. That is a highly questionable result, but need not be considered here in light of the conclusion that claim # 576 was a timely filed subrogation claim.
[4]  This does not mean that Outlet's claim may be allowed in an amount greater than the allowed claim of the creditor.
[5]  Section 509(a) reads "Except as provided in subsection (b) or (c) of this section, an entity that is liable with the debtor on, or that has secured, a claim of a creditor against the debtor, and that pays such claim, is subrogated to the rights of such creditor to the extent of such payment."
[6]  The proof of claim states that Outlet was a guarantor of the Hadley Lease but Outlet's answer to the Trustee's complaint, although it mentions the Guaranty of the Colonie Lease, makes no mention of a guaranty of the Hadley Lease.
[7]  Section 553 of the Code provides that Title 11 does not impair "any right of a creditor to offset a mutual debt owing by such creditor to the debtor that arose before the commencement of the case under this title against a claim of such creditor against the debtor that arose before the commencement of the case." Certain claims are nevertheless excluded from the application of this doctrine including (i) claims that are disallowed other than under section 502(b)(3); (ii) claims that were transferred to the creditor by an entity other than the debtor, after the commencement of the case or after 90 days before the commencement of the case, while the debtor was insolvent (which insolvency is presumed) or (iii) claims for debts that were incurred after 90 days before the commencement of the case, while the debtor was insolvent (which insolvency is presumed) for the purpose of obtaining a right of setoff. See section 553(a).
[8]  It should be noted that a creditor seeking to exercise setoff is not required to file a proof of claim. As discussed in In re Sutton Investments, Inc., 53 B.R. 226, 230 (Bankr.W.D.La.1985) section 553 does not contain a requirement that a creditor seeking to exercise a setoff must first file a proof of claim but merely provides that setoff will not be permitted if the claim is disallowed. If the debtor or trustee wants to attack a claim, either may file a proof of claim on behalf of the creditor who has not itself timely filed by virtue of section 501(c). See Gold Kist, Inc. v. Henderson (In re Henderson) 24 B.R. 630, 632 (Bankr.M.D.Ga.1982) (creditor who had not filed a proof of claim could assert setoff as affirmative defense, but could not use setoff claim to obtain affirmative recovery.) Accordingly, even it Outlet failed to timely file a proof of claim asserting its right of setoff, it could assert the right as an affirmative defense.
[9]  A claim for reimbursement should also be deemed pre-petition notwithstanding that the payment was made subsequent to bankruptcy, because at the time of the filing of the case, the guarantor had a contingent claim (subject to disallowance pursuant to section 502(e)(1)(B) if not fixed).
[10]  This discussion has been confined to payment on the Colonie Lease because the parties so confined it and because, as noted above, the facts underlying the payment of Pyramid are apparently disputed and, in any event, undeveloped.
[11]  The Trustee would also have this court read a section 553(b) standard into this section and deny setoff because Outlet improved its position within 90 days prior to the petition. As Congress elected not to incorporate such a provision in section 553(a)(2) [which clearly it knew how to do and did in section 553(b)], this court refuses to impose one.
[12]  The sum of $141,000 paid for use and occupation is not included. This is a post-petition obligation which is not available for setoff because of lack of mutuality. See Elliott v. Leounes (In re William J. Brittingham, Inc.), 39 B.R. 575, 578 (Bankr.D.Del.1984).
[13]  Section 502(b)(6) of the Code provides that "the claim of a lessor for damages resulting from the termination of a lease of real property [is limited to]

(A) the rent reserved by such lease, without acceleration, for the greater of one year, or 15 percent, not to exceed three years, of the remaining term of such lease, following the earlier of 
(i) the date of the filing of the petition; and
(ii) the date on which such lessor repossessed, or the lessee surrendered, the leased property; plus
(B) any unpaid rent due under such lease, without acceleration, on the earlier of such dates.
[14]  The Trustee also asserts that a surety cannot be subrogated to rights of the obligee where the indebtedness has not been satisfied in full. We find no such limitation in section 509. As stated in 3 L. King Collier on Bankruptcy ¶ 509.02 at page 509-6 (15th ed. 1988), "A partial discharge of the principal debt by the codebtor is clearly covered by section 509(a)." The court notes, however, that by virtue of section 553(c) Outlet's claim is subordinate to the primary creditor's claim until such claim is paid in full.
[15]  The yearly rent reserved was $282,000. Under 11 U.S.C. § 502(b)(6), the maximum allowable claim for breach of the lease was three years multiplied by the yearly rent reserved, or $846,000.
[16]  This is not to say that the court today holds that a claim subordinated to the claims of all unsecured creditors may always be used to diminish or eliminate the subordinated creditor's liability to the debtor. See Marta Group, Inc. v. Perlstein's Inc. (In re Marta Group, Inc.), 47 B.R. 220 (Bankr.E.D.Pa.1985); F.D.I.C v. Bank of America National Trust and Savings Assoc., 701 F.2d 831 (9th Cir.), cert. denied 464 U.S. 935, 104 S.Ct. 343, 78 L.Ed.2d 310 (1983).
[17]  Without close analysis, the language quoted from Flanagan at page 780 of this decision might seem to be at odds with the limitation today placed on Outlet's maximum claim for setoff. For in Flanagan the court said that the surety's setoff would be allowed to the full extent of the surety's debt. 47 Bankr. at 302. But in Flanagan, there was no limitation, as here, on the allowability of the claims to which the surety succeeded. The issue there presented was whether the surety's setoff was limited not to the allowed claim of the materialman but to the dividend which the materialman would have received. The court concluded, quite properly, that the dividend did not define the setoff to which the surety was entitled.
[18]  Perhaps if Outlet were engaged in suit with UDS Outlet might be able to show that the various documents which it executed appurtenant to the sale constituted but a single transaction with UDS.
