
247 B.R. 463 (2000)
In re LIBBY INTERNATIONAL, INC., Libby Holdings, Inc., Debtors.
Mark G. Stingley, Chapter 11 Trustee, Appellee,
v.
AlliedSignal, Inc., Appellant.
BAP No. 99-6083.
United States Bankruptcy Appellate Panel of the Eighth Circuit.
Submitted March 21, 2000.
Decided April 28, 2000.
*464 *465 Scott J. Goldstein, Kansas City, MO, Betsy M. Garvin, appeared on brief, for appellant.
Samuel S. Ory, Kansas City, Mo, for appellee.
Before KRESSEL, SCHERMER and SCOTT, Bankruptcy Judges.
SCOTT, Bankruptcy Judge.

I
Debtor Libby International, Inc. ("Libby"), which manufactured portable electric generating equipment for the United States Air Force, contracted with AlliedSignal, Inc. to obtain engines suitable for use in generators manufactured by Libby International. In March 1998, Libby International owed AlliedSignal over eight million dollars on the contracts for engines. In light of this high debt and in order to facilitate payment, an escrow account was established with First Trust National Association ("the bank"). In April 23, 1998, Libby submitted a form to the Air Force to have payments under its contract with the Air Force deposited directly to the escrow account rather than to Libby. Because of an account error, however, this was not initially effected and a $500,000 check was sent directly to Libby. Libby, however, in compliance with its agreement with AlliedSignal, deposited the $500,000 into the escrow account on May 22, 1998. The accounting error was rectified so that the next payment from the U.S. Air Force was electronically transferred directly into the escrow account. Thus, on June 23, 1998, the U.S. Air Force deposited $56,577.30 into the escrow account.
On June 29, 1998, Libby was in default under its contract with AlliedSignal causing AlliedSignal to advise the bank to send it the funds in the escrow account in the amount of $56,577.30, and the bank did so. Two other deposits and transfers to AlliedSignal were also made within the ninety day period prior to the filing of the chapter 11 case. AlliedSignal received $325,319.45 from the escrow account during this ninety day period. On September 10, 1998, Libby commenced a chapter 11 bankruptcy case. On the date of the chapter 11 filing, Libby owed AlliedSignal $7,855,899.91 under a note and $2,406.191.30 under a purchase order, all unsecured.
The trustee commenced an adversary proceeding under section 547(b) to avoid the preferential transfers and recover $325,319.45 from AlliedSignal under section 550. AlliedSignal defended the action on the basis that the earmarking doctrine precluded recovery by the trustee. The parties submitted stipulated facts and crossmotions for summary judgment whereupon the bankruptcy court[1] determined that earmarking did not apply and entered judgment for the trustee. AlliedSignal appealed and we affirm the decision of the bankruptcy court.

II
Section 547(b) provides for avoidance of a transfer of an interest of the debtor in property, Brown v. First National Bank of Little Rock, 748 F.2d 490, 491 (8th Cir. 1984), and provides in pertinent part:
(b) Except as provided in subsection (c) of this section, the trustee may avoid any transfer of an interest of the debtor in property 
(1) to and for the benefit of a creditor;
(2) for or on account of an antecedent debt owed by the debtor before such transfer was made;
(3) made while the debtor was insolvent;
(4) made 

*466 (A) on or within ninety days before the date of the filing of the petition; or
(B) between ninety days and one year before the date of the filing of the petition, if such creditor at the time of such transfer was an insider; and
(5) that enables such creditor to receive more than such creditor would receive if 
(A) the case were a case under chapter 7 of this title;
(B) the transfer had not been made; and
(C) such creditor received payment of such debt to the extent provided by the provisions of this title.
* * * * * *
(f) For the purposes of this section, the debtor is presumed to have been insolvent on and during the 90 days immediately preceding the date of the filing of the petition.
(g) For the purposes of this section, the trustee has the burden of proving the avoidability of a transfer under subsection (b) of this section, and the creditor or party in interest against whom recovery or avoidance is sought has the burden of proving the nonavoidability of a transfer under subsection (c) of this section.
11 U.S.C. § 547(b), (f), (g).
Thus, the trustee thus bears the burden of proving the elements of avoidability under section 547(b). Nordberg v. Arab Banking Corporation (In re Chase & Sanborn Corporation), 904 F.2d 588, 595 n. 15 (11th Cir.1990). Each of these elements must be proven by a preponderance of the evidence. Pembroke Development Corporation v. Commonwealth Savings & Loan Association (In re Pembroke Development Corporation), 124 B.R. 398, 401 (Bankr.S.D.Fla.1991). The burden then shifts and the creditor or transferee bears the burden of providing any affirmative defenses pursuant to section 547(c). Nordberg, 904 F.2d at 595 n. 15. In order to recover the $325,000 from AlliedSignal, the trustee was required to demonstrate that a transfer 
(1) of an interest in property of Libby occurred;
(2) was to and for the benefit of AlliedSignal;
(3) for or on account of an antecedent debt;
(4) made while Libby was insolvent;
(5) within ninety days prior to the commencement of the case; and
(6) AlliedSignal was left better off than if the transfer had not been made and AlliedSignal asserted its claim in a Chapter 7 liquidation.
See Buckley v. Jeld-Wen, Inc. (In re Interior Wood Products Company), 986 F.2d 228 (8th Cir.1993). The enumerated elements were not significantly in dispute below and are not the subject on appeal. The parties dispute whether there was a transfer of an interest of the debtor.
While the Bankruptcy Code does not define "property of the debtor," the Supreme Court has indicated that "`property of the debtor' subject to the preferential transfer provision is best understood as that property that would have been part of the estate had it not been transferred before the commencement of bankruptcy proceedings." Begier v. Internal Revenue Service, 496 U.S. 53, 110 S.Ct. 2258, 2263, 110 L.Ed.2d 46 (1990). For example, a debtor has no interest in property that it holds in trust for another, or in which it has no legal or equitable interest. Id. This maxim holds true for payments that are made by a third party to reduce a debt. No transfer of property of the debtor occurs when a third party pays the creditor directly. Vadnais Lumber Supply, Inc. v. Byrne (In re Vadnais Lumber Supply, Inc.), 100 B.R. 127, 133 (Bankr.D.Mass. 1989).
The earmarking doctrine is based upon the element of proof that requires *467 that an interest of the debtor be transferred in order for a preference to occur. The doctrine was originally based upon the rationale that since the funds were provided by a third party for the specific purpose of paying a selected creditor, the debtor had no actual control over disbursement. Thus, because the estate was not diminished by the payment, the payee should not be required to return the funds. See generally Buckley v. JeldWen, Inc. (In re Interior Wood Products Co.), 986 F.2d 228 (8th Cir.1993); Dubis v. Heritage Bank & Trust Co. (In re Kenosha Liquidation Corp.), 158 B.R. 774 (Bankr.E.D.Wis.1993). If the result of the transaction is merely to substitute one creditor for another, the estate is not diminished. Brown v. First National Bank of Little Rock, 748 F.2d 490, 491 (8th Cir.1984). The earmarking doctrine is not strictly an affirmative defense under Section 547(c), under which the defendant has the burden of proof, 11 U.S.C. § 547(g), but, rather, is an argument arising out of the language in section 547(b) which requires that, as an element of the trustee's proof, recovery be based upon a transfer of an interest of the debtor. Thus, the earmarking doctrine is derived from an element of the plaintiff's proof rather than an affirmative defense. See Kaler v. Community First National Bank (In re Heitkamp), 137 F.3d 1087 (8th Cir.1998).
AlliedSignal urges that the doctrine be applied here because the funds were entrusted to another, the bank, with instructions under a specific agreement to pay the debtor's obligation on a particular antecedent debt, citing Herzog v. Sunarhauserman (In re Network 90 Degrees, Inc.), 126 B.R. 990 (N.D.Ill.1991). See generally McCuskey v. National Bank of Waterloo (In re Bohlen Enterprises, Ltd.), 859 F.2d 561, 566 (8th Cir.1988)(describing history of the doctrine).
The doctrine has also been extended to situations in which the new creditor is a lender rather than a guarantor. Id. at 566. Although in Bohlen, the Eighth Circuit criticized this earlier extension of the doctrine, it did not specifically reject it. Instead, in Bohlen, the Eighth Circuit established the specific elements for application of the earmarking doctrine:
(1) There exists an agreement between the new lender and the debtor that the new funds will be used to pay a specified antecedent debt;
(2) The terms are actually performed; and
(3) The transaction, viewed as a whole, does not result in any diminution of the estate.
McCuskey v. National Bank of Waterloo (In re Bohlen Enterprises, Ltd.), 859 F.2d 561, 566 (8th Cir.1988). The Eighth Circuit revisited the doctrine in Kaler v. Community First National Bank (In re Heitkamp), 137 F.3d 1087 (8th Cir.1998), and, in the context of determining whether the substitution of one secured creditor for another fell within the doctrine, determined that the doctrine extends to situations where a secured third party pays a debt of the debtor and the payment has no effect on the estate of the debtor. The ultimate analytical result of Heitkamp is that earmarking situations are analyzed in terms of the net result of the transaction, i.e., whether there is a diminution of the debtor's estate. See Krigel v. Sterling National Bank (In re Ward), 230 B.R. 115, 119 (8th Cir. BAP 1999).

III
The facts in this case present a classic preference with no earmarking implications. Libby owed a large debt and was not timely making payments to AlliedSignal, prompting the creditor to institute measures to ensure collection. These actions are precisely of the type the preference provisions are meant to reverse in order to promote equality of treatment among the unsecured creditors. The parties agreed that an income source of the debtor would be directed through a bank to AlliedSignal, rather than through Libby. For preference purposes, the only alteration *468 that was made to the agreement between the parties was a change in the address to which one of the debtor's sources of income was to send its checks. There was no substitution of creditors nor any other change that would affect the analysis with regard to property of the estate. Before the address change, Libby owed $8,000,000 to AlliedSignal and, theoretically at least, periodically sent its payments on the debt when it received its payments from the U.S. Air Force. After the address change, Libby owed $8,000,000 to AlliedSignal but the U.S. Air Force was directed to send checks directly to an escrow account for ultimate payment to AlliedSignal. Before the address change, Libby was entitled to receive funds from the U.S. Air Force and it was, under its agreement with AlliedSignal, obligated to make payments on its debt to AlliedSignal. After the address change, Libby was still entitled to payments from the U.S. Air Force but entered into agreements for the funds to be sent directly to AlliedSignal. Libby's property interest is the same under either scenario.
Under the earmarking doctrine, the substitution of one creditor for another should not result in a diminution of the debtor's estate. In this case, however, there was no substitution of a creditor, no new creditor, no secondarily liable creditor, nor was there a third party who paid down a debt of the debtor. There is only one creditor which altered its original payment terms with a defaulting debtor so that it would begin receiving funds from the debtor's income source, through a bank escrow agreement, rather than directly from the debtor. The receipt of those funds depleted the assets of the estate in the same manner as if Libby had received the funds from the U.S. Air Force and transmitted them to AlliedSignal itself. Earmarking has no application in this situation.
AlliedSignal also urges that since it continued to supply Libby with engines, the "net result" is that the debtor received property and was able to produce income such that there was an enhancement of the estate. Again, AlliedSignal misinterprets the nature of the doctrine and the net result rule. In applying the earmarking doctrine, courts analyze whether particular payments resulted in a diminution of the estate or whether, taken as a whole, one creditor was merely substituted for another. Kaler v. Community First National Bank (In re Heitkamp), 137 F.3d 1087 (8th Cir.1998) is a classic example of the operation of the doctrine: earmarking applied because one creditor was merely substituted for another. In Heitkamp, the trustee sought to set aside a second mortgage granted by the debtors to a bank. Prior to obtaining the second mortgage, the debtors owed subcontractors $40,000 secured by the house. The bank paid the subcontractors and obtained the second mortgage. Before the loan, the debtors owed a $40,000 secured debt to several creditors; after the loan, the debtors owed the same $40,000 secured debt but only to one secured creditor. There was no alteration to the assets or liabilities of the estate, i.e., the net result was that there was no change other than the identity of the secured parties. Thus, although Heitkamp extended the earmarking doctrine to secured interests, it serves to illustrate the proper application of the doctrine and further emphasizes that, in the Eighth Circuit, the focus of analysis is upon the effect of the transaction upon the estate.
In this case there was no substitution of creditors: money was simply paid to a creditor on an antecedent debt within the ninety days prior to bankruptcy. The fact that AlliedSignal continued to supply the debtor does not factor into the earmarking doctrine.[2] The net result, that the specific payments diminished the funds ultimately available to pay to all creditors, is not *469 altered by the fact that AlliedSignal continued to supply the debtor with engines.
AlliedSignal urges adoption of the conclusions in Herzog v. Sunarhauserman (In re Network 90 Degrees, Inc.), 126 B.R. 990 (N.D.Ill.1991), but we do not believe it should be followed because, as noted by the bankruptcy court, it is not consistent with the earmarking doctrine as enunciated by the Eighth Circuit. First, the court in Network 90 Degrees rested it decision largely on the fact that the debtor had no control over the funds such that the funds never became property of the estate. This analysis errs because it misapplies the doctrine and ignores the effect upon the estate. In this case, like that in Network 90 Degrees, there is, in fact, a diminution of the estate and a preferential payment made to one creditor over another. By focusing solely upon the issue of control, a later step in the earmarking analysis, Network 90 misses the point that the earmarking analysis does not even apply when there is no new creditor substituted for an old creditor and an asset of the estate is simply being channeled differently. Earmarking applies when a third person makes a loan to a debtor specifically to enable the debtor to satisfy the claim of a designated creditor. The proceeds in the transaction never become part of the debtor's assets and no preference is created even in situations when the debtor has temporary custody of the funds.[3] In this instance a creditor was not substituted, there was merely a diversion of an income source. The fact that the debtor did not handle the checks does not compel the conclusion that it has no interest in them. The situations are, for preference purposes, completely inapposite.
Even if we apply the control test as urged by AlliedSignal, the result does not change because Libby at all times had the ability to exercise control over the funds. First, the stipulated facts belie AlliedSignal's assertion that the debtor had no control over the funds after implementation of the new agreement. Indeed, the stipulated facts indicate that even after the amendments and agreement regarding the creation of the escrow account, funds were sent by the U.S. Air Force directly to Libby. Cf. Amick v. Hoff Companies (In re Amick), 163 B.R. 589 (Bankr.D.Idaho 1994)(debtor designated to whom check payable); Wasserman v. Village Assoc. (In re Freestate Management Serv., Inc.), 153 B.R. 972 (Bankr.D.Md.1993). The fact that Libby complied with its contractual agreements with AlliedSignal and deposited the funds into the escrow manually does not obviate its control. If the court adopted the rule urged by AlliedSignal, a creditor could avoid the preference provisions simply by requiring a lockbox arrangement with the debtor, effectively nullifying the provisions of 11 U.S.C. § 547 with regard to that debtor and creditor.
Second, Libby in fact retained control over the funds because it had the legal ability to alter the transmissions from the U.S. Air Force at any time. To direct funds into the escrow account, it merely filled out a form, SF 3881, and transmitted it to the appropriate defense department office. Although Libby was obligated under its contract with AlliedSignal to direct the funds in a certain manner, Libby had the power and control to file a new SF 3881 and direct the payments otherwise if it so chose. Indeed, the Debt Restructure Agreement between Libby and AlliedSignal provided not only that Libby had the ability to modify the payment instructions to the department of defense, but also required Libby to provide AlliedSignal with assurance, if requested, that the payment instructions had not been modified. Thus, the agreement contemplated that Libby would retain control of the disposition *470 of the funds due it from the U.S. Air Force. The fact that a change would constitute a breach of contract does not obviate the power to effect the action.

IV
The purpose of the section 547 avoidance statute is to place all unsecured creditors on an equal basis for purposes of distribution of the debtor's assets. In re Bohlen, 859 F.2d at 566 n. 10 ("[T]he provision facilitates the prime bankruptcy policy of equality of distribution among creditors of the debtor."); accord Advo-System, Inc. v. Maxway Corp., 37 F.3d 1044, 1047 (4th Cir.1994). Within the preference period, the 90-day time period Congress deemed appropriate for equalizing distribution of estate assets to creditors, AlliedSignal, an unsecured creditor in this bankruptcy case, received property of the debtor in payment of an antecedent debt, more than it would have received under a chapter 7 case. The payments to AlliedSignal not only fall demonstrably within the policy parameters of the statute, they meet each of the statutory elements of a preference. Accordingly, the judgment of the bankruptcy court is affirmed.
NOTES
[1]  The Honorable Jerry W. Venters, United States Bankruptcy Judge for the Western District of Missouri.
[2]  Other preference provisions, such as the new value defense, exist to remedy those situations. See generally 11 U.S.C. § 547(c)(1), (c)(4). Similarly, the transfers would not be avoidable as preferences had AlliedSignal properly perfected its security interest.
[3]  See, e.g., Dubis v. Heritage Bank and Trust Co. (In re Kenosha Liquidation Corp.), 158 B.R. 774 (Bankr.E.D.Wis.1993)(borrowed funds were held in debtor's desk seven days and then deposited pursuant to agreement); In re Kelton Motors, Inc., 97 F.3d 22, 26-27 (2d Cir.1996)(debtor had no control over check made payable to it).
