
155 B.R. 739 (1992)
In re ALLIED COMPANIES, INC., Debtor.
ALLIED COMPANIES, INC., Plaintiff,
v.
BROUGHTON FOODS COMPANY, Defendant.
Bankruptcy No. 89-4497-RWV-11, Adversary Proceeding No. 91-116.
United States Bankruptcy Court, S.D. Indiana, Indianapolis Division.
June 9, 1992.
*740 U.S. Trustee, Indianapolis, IN.
James A. Huggins, Theisen, Brock, Frye, Erb & Lepper Co., Marietta, OH, for Broughton Foods Co.
Jeffrey E. Ramsey, Hostetler & Kowalik, Indianapolis, IN, for Allied Companies, Inc.

ORDER GRANTING MOTION FOR PARTIAL JUDGMENT ON THE PLEADINGS
RICHARD W. VANDIVER, Bankruptcy Judge.
This matter comes before the Court on the Defendant Broughton Foods Company's Motion for Partial Judgment on the Pleadings, filed on January 27, 1992. The Court now grants the motion for the reasons below.
Broughton Foods Company ("Broughton") supplied grocery products to the Debtor, a grocery wholesaler, on account. On June 22, 1989, the Debtor filed for relief under Chapter 11 of the Bankruptcy Code. On March 20, 1991, the Debtor initiated this adversary proceeding by filing a Complaint to Recover Preference Under Sec. 547. This Court has jurisdiction over this matter. 28 U.S.C. section 157(b)(2)(F).
A trustee, or in Chapter 11, a debtor-in-possession ("DIP"), may avoid any transfer of an interest of a debtor in property to a creditor, on account of an antecedent debt, made while the debtor was insolvent, on or within 90 days of the filing of the bankruptcy *741 petition (or one year if the creditor is an insider), that enables the creditor to receive more than it would receive if the case were one under chapter 7, the creditor had not received the payment, and the creditor received payment on the debt to the extent provided by the provisions of the Bankruptcy Code. 11 U.S.C. section 547(b). A debtor is presumed to be insolvent during the 90 days immediately preceding the date of the filing of the petition. 11 U.S.C. section 547(f).
The primary purposes for allowing the estate to recover preferential transfers are to discourage creditors from dismembering a financially troubled debtor during its slide into bankruptcy and to insure equitable distribution of assets among similarly situated creditors. See In re Fuel Oil Supply & Terminaling, Inc., 837 F.2d 224, 227 (5th Cir.1988); In re Energy Co-op, Inc., 832 F.2d 997, 1003 (7th Cir. 1987). Creditors are less likely to extract eve of bankruptcy payments from debtors if they know that they will be required to disgorge them for other creditors to share. Fuel Oil, 837 F.2d at 227. However, some otherwise preferential transfers are exempt from avoidance because recovery would not further these goals. Id. Thus, to encourage creditors to continue dealing with troubled debtors, and possibly prevent the necessity of bankruptcy, payments made by a debtor in the ordinary course of business and those made in contemporaneous exchange for new value may be excepted from preference recovery. See 11 U.S.C. section 547(c)(2) and (c)(1). While Broughton has reserved the right to assert these two exceptions, yet a third exception is at issue in Broughton's motion.
A trustee or DIP cannot avoid an otherwise preferential transfer to the extent that such transfer was:
to or for the benefit of a creditor, to the extent that, after such transfer, such creditor gave new value to or for the benefit of the debtor
(A) not secured by an otherwise unavoidable security interest; and
(B) on account of which new value the debtor did not make an otherwise unavoidable transfer to or for the benefit of the creditor....
11 U.S.C. section 547(c)(4). This "new value" exception to preference recovery is directed at debtors and creditors who had multiple transactions during the preference period, as is often the case when the debtor has an open or running account with a supplier. "If the creditor and the debtor have more than one exchange during the 90-day period, the exchanges are netted out according to the formula in paragraph (4)." H.R.Rep. No. 595, 95th Cong., 1st Sess. 374 (1977); S.Rep. No. 989, 95th Cong., 2d Sess. 88 (1978), 1978 U.S.C.C.A.N. "New value" is defined as including "money or money's worth in goods, services, or new credit...." 11 U.S.C. section 547(a)(2).
According to a leading bankruptcy commentator:
This exception removes the unfairness of allowing the trustee to void all transfers made by the debtor to a creditor during the preference period without giving the creditor any corresponding credits for subsequent advances of new value to the debtor's estate....
Section 547(c)(4) also promotes the general policy objective underlying the preference provisions by encouraging creditors to continue to extend credit to financially troubled entities and discouraging a "race to the courthouse." In addition, this section promotes equality of treatment among creditors, because its utility is limited to the extent to which the estate was enhanced by the creditor's subsequent advances during the preference period.
4 Collier on Bankruptcy para. 547.12 and n. 5 (15th Ed.).
Up to this point the parties are in general agreement. Their dispute is over the specifics of how the "netting out" formula of 547(c)(4) is supposed to work.
In its complaint, the Debtor seeks to recover $250,605.04 in alleged preferential payments, supported by an attached exhibit showing the parties' transactions during the preference period. Broughton, for the *742 purpose of its motion, has taken the Debtor's dates and figures as accurate. Using this data, Broughton concludes that there is a net recoverable preference of not more than $104,803.00.
The difference in results lies in the parties' netting out formulas. The transactions and results under the two formulas are reconstructed below, rounded to the nearest thousand.


Date     Amount    Amount     Net Recoverable
         Shipped   Paid
                                      Broughton
(1989)                      Debtor
3/25     $33,000                  0         0
3/28               $33,000   33,000    33,000
4/5                $38,000   71,000    71,000
4/8      $38,000             71,000    33,000
4/10     $33,000             71,000         0
4/12               $37,000  108,000    37,000
4/14               $33,000  141,000    70,000
4/15     $36,000            141,000    34,000
4/22     $32,000            141,000     2,000
4/25               $35,000  176,000    37,000
4/27               $36,000  212,000    73,000
4/29     $31,000            212,000    42,000
5/6      $34,000            178,000     8,000
5/10               $32,000  210,000    40,000
5/13     $33,000            177,000     7,000
5/20     $31,000            146,000         0
5/23               $38,000  184,000    38,000
5/23               $33,000  217,000    71,000
5/26               $33,000  250,000   104,000
5/27     $32,000            218,000    72,000
6/3      $34,000            184,000    38,000
6/7                $36,000  220,000    74,000
6/10     $33,000            187,000    41,000
6/14               $32,000  219,000    73,000
6/20               $31,000  250,000   104,000

These figures show that from March 25, 1989 through the date of bankruptcy, the Debtor made payments to Broughton of approximately $447,000.00 and Broughton shipped to the Debtor goods invoiced at approximately $400,000.00. Broughton would owe no more than about $47,000 if the rule were a simple bottom-line comparison, as it was under the old Bankruptcy Act. See Former 11 U.S.C. section 60c; 4 Collier on Bankruptcy 547.12 (15th Ed.). Under current law, however, the creditor's advance of new value must come after the payment sought to be offset. The Debtor's formula, as expected, recognizes this requirement, but so does Broughton's. Broughton does not give itself credit for any shipment made before the first payment in the preference period and does not let shipments in excess of the running balance carry forward to reduce subsequent payments.
The difference in the formulas is the point at which the parties begin giving Broughton credit for its shipments. Broughton gives credit for all shipments after the first payment within the preference period (to the extent of the running balance), whereas the Debtor gives Broughton credit only for shipments that remained unpaid at the time of bankruptcy. Thus, since the first four shipments were paid for with four of the last five payments, Broughton is not given credit for these four shipments.
Broughton, however, contends that is unfair for the Debtor both to avoid the payments for these shipments and to refuse to credit these shipments in its running balance. In effect, Broughton accuses the *743 Debtor of double-dipping. The Debtor does not give Broughton credit for the first four shipments because the last four payments paid for them. Then, the Debtor seeks to avoid those very payments it contends negate Broughton's new value defense for the first four shipments.
The Debtor claims support for its position in case law. For instance, the Third Circuit stated that there are three elements in section 547(c)(4) analysis: (1) that the transfer was an otherwise avoidable preference, (2) that after the transfer, the creditor advances new value to the debtor on an unsecured basis, and (3) that the debtor has not compensated the creditor for the new value "as of the date that it filed its bankruptcy petition". See In re New York City Shoes, Inc., 880 F.2d 679, 680 (3d Cir.1989) (emphasis added). The Seventh Circuit earlier phrased this test as follows:
Section 547(c)(4) establishes a subsequent advance rule whereby a preferential transfer is insulated from a trustee's avoidance powers to the extent that a creditor extends new value, which is unsecured and remains unpaid, to the debtor after the preferential transfer.
In re Prescott, 805 F.2d 719, 728 (7th Cir. 1986), quoting In re Saco Local Development Corp., 30 B.R. 859, 867 (Bankr.D.Me. 1983) (first emphasis added, second emphasis in original).
However, the issue in New York City Shoes was when a payment by post-dated check was considered to have been made. In Saco, the quoted language was addressed to the change the Code made in the netting rulethat to serve as an offset, the new value must be advanced after the preference. Prescott involved a convoluted relationship among the debtors, their bank and other creditors, and addressed several novel issues, such as whether a second lienholder received an indirect preference when the bank, as first lienholder, offset the debtors' checking account balance against the bank's claim, and whether the bank's allowing overdrafts after its seizure of the debtors' certificates of deposit constituted an extension of new value to the debtors. The double-dipping issue presented here, however, was not among the issues faced in either New York City Shoes, Saco, or Prescott, and there is no indication that the "remains unpaid" element of these court's analysis would be literally and uncritically applied when the payment for the new value was later avoided as a preference.
The "remains unpaid" requirement in the above cases derives from 547(c)(4)(B). However, the language of this provision actually supports Broughton's formula. To illustrate, on April 5, 1989, Broughton received a preference payment of $38,000. On April 8, 1989, Broughton sent a shipment valued at $38,000. On May 23, 1989, the Debtor paid for that shipment. In paying for the shipment, however, the Debtor "did not make an otherwise unavoidable transfer" to Broughton, because the payment is counted as an avoidable preference under both Broughton's and the Debtor's formulas.
There is also case law supporting Broughton. In In re Baumgold Bros, Inc., 103 B.R. 436 (Bankr.S.D.N.Y.1989), the court rejected the trustee's contention that only the preference immediately preceding the new value should be considered in determining the affect of the new value on the total preference claim. Instead, the court concluded that the creditor be allowed to maintain a net preference balance according to the Broughton formula. See id at 439-40. The court found that the trustee's formula would deny the creditor the ability to rely on prior payments by the debtor in advancing new value to the debtor, which would be at odds with 547(c)(4)'s purpose of encouraging creditors to continue to do business with troubled debtors. See id. at 440. In an earlier case, that court, in rejecting a argument similar to the Debtor's, also rejected the requirement that the claim for the new value remain unpaid at the time of bankruptcy. See In re Paula Saker & Co., Inc., 53 B.R. 630, 634 (Bankr.S.D.N.Y.1985). A district court did the same, concluding that the "remains unpaid" language of prior cases could not be taken out of context to support a position *744 like the Debtor's. See In re Isis Foods Inc., 39 B.R. 645, 653 (W.D.Mo.1984).
But this Court need not go as far as rejecting the "remains unpaid" language in cases like Prescott, because even with this element, Broughton's new value defense in not necessarily defeated. Under the Bankruptcy Code's claim allowance provision, a claim arising from the avoidance of a preferential transfer is treated as if the claim has arisen before the filing of the bankruptcy petition. See 11 U.S.C. sections 502(h), 550, 547(b). In other words (taking a simple case as an example), although a creditor did not have a claim at the time of bankruptcy because its claim had been satisfied by a preferential payment, subsequent avoidance of the payment relates back to the time before bankruptcy, so the claim is deemed to have been unpaid at the time the petition was filed. This means that the creditor may assert only a general unsecured prepetition claim against the estate, rather than arguing for a higher priority post-petition administrative claim. See 11 U.S.C. sections 503, 507(a), 726(a), 1129(a)(9). If avoidance of the preference relates back to the time before bankruptcy for the purpose of claim allowance, to the detriment of the creditor, then it is only logical and fair that it also relate back for the purpose of determining whether a claim for new value "remain[ed] unpaid" at the time of bankruptcy.
Not only is Broughton's formula supported by the language of the statute, case law, and the concept of relation back, it is also yields the more equitable result and better comports with the purposes of section 547(c)(4). The prime equitable basis for the 547(c)(4) exception is that new value extended by the creditor in essence returns the earlier preferential payment to the debtor (up to the value of the new value). See Prescott, 805 F.2d at 727. If the debtor then pays for the new value, the preference is once again in the hands of the creditor, but the creditor has received only one preference, not two. The Debtor's formula would give the estate an inequitable double benefitno credit given for the creditor's advance of new value and recovery of the payment for this new value.
To illustrate, assume at the beginning of the preference period the debtor has a past due debt to the creditor for $10,000, and during the preference period the following transactions occurred:


Date   Amount Shipped   Amount Paid
4/1                     $10,000
4/15   $10,000
6/15                    $10,000

The day after the last payment, the debtor files for bankruptcy relief. If the last payment had not been made, the Debtor would be entitled to recover nothing, because the shipment of April 15 would offset the preference of April 1. The June 15 payment puts the creditor $10,000 ahead, preferencewise. However, under the Debtor's formula, the second payment enables the trustee or DIP to recover $20,000not a bad (and almost immediate!) return on a $10,000 investment. A savvy debtor anticipating Chapter 11 might find a strategy here for funding its reorganization.
Not only would the Debtor's formula yield inequitable results for individual creditors, but it would also frustrate one of the main purposes of section 547(c)(4). By increasing the preference exposure of creditors who risk continuing to deal with financially troubled debtors, the double-dipping of the Debtor's formula would discourage the very activity this provision was meant to promote, and indirectly harm struggling debtors who need ongoing creditor support to stay out of bankruptcy.
There is no inequity to debtors in Broughton's formula. A creditor who sells to a debtor on account is fully within its rights to limit its risk of nonpayment. The creditor has no obligation to allow a debtor to run up its account indefinitely. Section 547(c)(4) allows creditors like Broughton, who wish to limit their risk of nonpayment, *745 to continue dealing with troubled debtors rather than cutting them off once the highest acceptable risk is reached.
Because the Court concludes that Broughton's formula is the correct one to use in determining the new value preference exception, Broughton is entitled to partial judgment on the pleadings.
The Court therefore GRANTS Broughton's Motion for Partial Judgment on the Pleadings. No judgment, however, will be entered until final disposition of this case.
SO ORDERED.
