
188 B.R. 492 (1995)
In re John J. MORAN and Dora Moran, Debtors.
Allan B. MENDELSOHN, Chapter 7 Trustee of the Estate of John J. Moran and Dora Moran, Plaintiff,
v.
LOUIS FREY CO., INC., Defendant.
Bankruptcy No. 893-81674-20. Adv. No. 894-8257-20.
United States Bankruptcy Court, E.D. New York.
November 14, 1995.
*493 Flower & Medalie, Bay Shore, New York, for Plaintiff.
Certilman, Balin, Adler & Hyman, LLP, East Meadow, New York, for Defendant.

DECISION AND ORDER
ROBERT JOHN HALL, Bankruptcy Judge.

PRELIMINARY STATEMENT
This matter comes before the Court[1] upon a motion for summary judgment ("Motion") by Allan B. Mendelsohn, the chapter 7 trustee ("Trustee" or "Plaintiff") of the estate of John J. Moran and Dora Moran ("Debtors") as to his complaint ("Complaint") against *494 Louis Frey Co., Inc. ("Frey" or "Defendant") to avoid certain preferential transfers pursuant to 11 U.S.C. section 547(b).
In opposition, Frey filed its motion seeking summary judgment ("Cross-Motion") as to its asserted defenses to the Complaint and as to an award of legal fees.
For the reasons set forth below, the Trustee's Motion is granted in part and denied in part and Frey's Cross-Motion is granted in part and denied in part.

RELEVANT FACTUAL BACKGROUND
On June 8, 1995, the parties filed a joint Stipulation of Facts ("Stipulation") which provides as follows:
1. The Debtors filed a voluntary petition for relief under and pursuant to Chapter 7 of Title 11, United States Code (the "Bankruptcy Code") on March 25, 1993 (the "Filing Date").
2. The Plaintiff was duly appointed the Chapter 7 trustee to administer the Estate pursuant to Section 704 of the Bankruptcy Code.
3. The law firm of Flower & Medalie was duly employed as the successor counsel for the Plaintiff.
4. The Defendant is an "insider" to the Debtor, John J. Moran, as the term "insider" is defined in Section 101(31) of the Bankruptcy Code.
5. The Debtors were insolvent during the one year period prior to the Filing Date, as the term "insolvent" is defined in Section 101(32) of the Bankruptcy Code and used in Section 547(b)(3) of the Bankruptcy Code.
6. As of November 10, 1992, the Defendant advanced to or on behalf of the Debtors, the sum of Twenty One Thousand Six Hundred Eighty Five and 86/100 (21,685.86) Dollars [sic]. To evidence said advances, the Debtor executed a certain note dated November 10, 1992 (the "Note"). The Note provided that the Defendant agreed to advance to the Debtors the sum of Fifteen Thousand and 00/100 ($15,000.00) Dollars. The Note further provided that interest would accrue at the rate of 7½% per annum and to be payable on the earliest of: (a) the sale of the real property located at 8 Winthrop Drive, Woodbury, New York (the "Real Property"); (b) the termination of John J. Moran's employment; or (c) January 15, 1993. The Note further provided that the Defendant may advance to the Debtors up to an additional Thirty Thousand and 00/100 ($30,000.00) Dollars, on the same payment terms. A copy of the Note is annexed hereto as Exhibit "A".
7. To secure the repayment of the amounts advanced, the Debtors granted and delivered to the Defendant a mortgage (the "Mortgage") on the Real Property dated November 10, 1992. A copy of the Mortgage is annexed hereto as "Exhibit "B" [sic].
8. The Mortgage was delivered and received by the County Clerk of Nassau County on December 4, 1992. It is agreed by the parties that the Mortgage was duly perfected as of the date of its receipt on December 4, 1992.
9. After December 4, 1992, the Defendant made additional advances to the Debtors aggregating Forty Seven Thousand One Hundred Eighty Two and 73/100 ($47,182.73) Dollars to or on behalf of the Debtors.
10. The date of the perfection of the Mortgage was within the one (1) year period prior to the Filing Date.
11. The Real Property was sold by the Plaintiff for a total price of Three Hundred Twenty Seven Thousand and 00/100 ($327,000.00) Dollars, pursuant to the Order Authorizing Sale of Residence dated July 8, 1993 (the "Order"). Pursuant to the latter Order, the Defendant's lien, if any, on the Real Property attached to the sale proceeds, which monies are currently being held in escrow, pending a further order of the Court.

12. In the event that the lien of the Mortgage is not avoided pursuant to Section 547 of the Bankruptcy Code, the Defendant will receive more money than it would otherwise receive as an unsecured creditor (100% payoff on the outstanding debt secured by the Mortgage relative to a *495 pro-rata [sic] distribution to unsecured creditors).

The Court finds the following additional facts:
On June 14, 1994, the Trustee commenced this adversary proceeding against Frey to avoid Frey's lien on the proceeds from the sale of the Premises ("Proceeds") pursuant to 11 U.S.C. section 547(b).
On July 13, 1994, Frey filed an answer to the Complaint ("Answer") wherein it raised as affirmative defenses (1) that the Complaint failed to state a cause of action; (2) that the transfer was intended to be a contemporaneous exchange for new value given and in fact was a substantially contemporaneous exchange pursuant to 11 U.S.C. section 547(c)(1); and (3) that after the transfer, Frey gave new value to the Debtor within the meaning of 11 U.S.C. section 547(c)(4).
In the Answer, Frey also asserted a counterclaim seeking the payment of legal fees pursuant to a provision of the Mortgage.
On August 1, 1995, a hearing was held concerning the Motion and Cross-Motion ("Hearing").

LEGAL DISCUSSION
Under Fed.R.Civ.P. 56(c) made applicable to this proceeding by Fed.R.Bankr.P. 7056, summary judgment is proper if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law. Anderson v. Liberty Lobby, Inc., 477 U.S. 242, 106 S.Ct. 2505, 91 L.Ed.2d 202 (1986); Celotex Corp. v. Catrett, 477 U.S. 317, 106 S.Ct. 2548, 91 L.Ed.2d 265 (1986).
The Trustee seeks summary judgment against Frey as to his Complaint to avoid Frey's security rights in the Proceeds pursuant to 11 U.S.C. section 547(b). In the Cross-Motion, Frey seeks summary judgment against the Trustee dismissing the Complaint and awarding Frey its legal fees for defending its lien.
Section 547(b) of the Bankruptcy Code provides:

(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 or 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 
(A) on or within 90 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.
11 U.S.C. section 547(b).
Section 547(g) provides that:
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. section 547(g).
The parties have stipulated that several of the elements of 11 U.S.C. section 547(b) have been satisfied.
The parties have agreed that Frey is an insider to the Debtor, John J. Moran as that term is defined in section 101(31) of the Bankruptcy Code and is used in 11 U.S.C. section 547(b)(4)(B).
The parties have further agreed that the Debtors were insolvent during the one-year period prior to the Filing Date as that term is defined in section 101(32) of the Bankruptcy *496 Code and is used in 11 U.S.C. section 547(b)(3).
The parties have further agreed that the Mortgage was duly perfected on December 4, 1992 and that the date of perfection of the Mortgage was within the one-year period prior to the Filing Date within the meaning of 11 U.S.C. section 547(b)(4)(B).
The parties have further agreed that the requirements of 11 U.S.C. section 547(b)(5) have been satisfied in that if the lien of the Mortgage is not avoided under section 547 of the Bankruptcy Code, Frey will receive more money than it would otherwise receive as an unsecured creditor in this case.
The Trustee asserts and Frey does not dispute that the transfer of the Mortgage to it was to or for the benefit of a creditor within the meaning of 11 U.S.C. section 547(b)(1).
As the other elements of section 547(b) have been satisfied, the first issue presented is to what extent the transfer of the Mortgage was for or on account of an antecedent debt owed by the Debtors before such transfer was made pursuant to section 547(b)(2) of the Bankruptcy Code.
Section 547(e) of the Bankruptcy Code in pertinent part provides:

(e)(1) For the purposes of this section 
(A) a transfer of real property other than fixtures, but including the interest of a seller or purchaser under a contract for the sale of real property, is perfected when a bona fide purchaser of such property from the debtor against whom applicable law permits such transfer to be perfected cannot acquire an interest that is superior to the interest of the transferee. . . . 

(2) For the purposes of this section, except as provided in paragraph (3) of this subsection, a transfer is made . . .
(B) at the time such transfer is perfected, if such transfer is perfected after such 10 days. . . . 
11 U.S.C. section 547(e).
The parties have agreed the Mortgage was duly perfected on December 4, 1992, the date that the Mortgage was delivered and received by the County Clerk of Nassau County. As the perfection of the Mortgage occurred subsequent to ten (10) days after its delivery, the date of transfer was December 4, 1992, the date of the perfection of the Mortgage pursuant to 11 U.S.C. section 547(e)(2)(B).
The parties have agreed that as of November 10, 1992, the date that the Note and Mortgage were executed and delivered to Frey, that Frey had advanced to the Debtors the sum of $21,685.86.
The parties have further agreed that the Note provided for the payment of $15,000.00 which represented or evidenced previous advances to the Debtors and allowed for advances to the Debtors not to exceed the sum of an additional $30,000.00 on the same payment terms.
Section 101 of the Bankruptcy Code provides:

`[T]ransfer' means every mode, direct or indirect, absolute or conditional, voluntary or involuntary, of disposing of or parting with property or with an interest in property, including retention of title as a security interest and foreclosure of the debtor's equity of redemption. . . .
The term "antecedent debt" is not defined in the Bankruptcy Code. Pursuant to section 101(12) of the Bankruptcy Code, the term "`debt' means liability on a claim."
Section 101(5) of the Bankruptcy Code provides:

`[C]laim' means 
(A) right to payment, whether or not such right is reduced to judgment, liquidated, unliquidated, fixed, contingent, matured, unmatured, disputed, undisputed, legal, equitable, secured, or unsecured; or

(B) right to an equitable remedy for breach of performance if such breach gives rise to a right to payment, whether or not such right to an equitable remedy is reduced to judgment, fixed, contingent, matured, unmatured, disputed, undisputed, secured, or unsecured. . . .
Determining the issue as to whether a debt is current, or antecedent depends upon when the debt was incurred. In re Pan Trading Corp., S.A., 125 B.R. 869, 875 *497 (Bankr.S.D.N.Y.1991) (citing In re Durant's Rental Center, Inc., 116 B.R. 362, 366 (Bankr.D.Conn.1990); In re Vasu Fabrics, Inc., 39 B.R. 513, 516-17 (Bankr.S.D.N.Y. 1984)).
A debt is incurred when the debtor first becomes legally obligated to pay. In re Pan Trading Corp., S.A., 125 B.R. 869, 875 (Bankr.S.D.N.Y.1991); see In re Western World Funding, Inc., 54 B.R. 470, 477 (Bankr.D.Nev.1985).
Although the parties have agreed that as of November 10, 1992, Frey had advanced $21,685.86, inasmuch as the Note only reflected prior advances in the amount of $15,000.00, the Court finds that as of December 4, 1992, the date of the perfection of the Mortgage, Frey held a valid lien on the Premises in the amount of $15,000.00. As the balance of the prior advances ($21,685.86 - $15,000.00 = $6,685.86), $6,685.86, was not reflected in the Note so therefore said amount was not secured by the Mortgage. Therefore, the Court concludes that the transfer of the Mortgage was for or on account of antecedent debt within the meaning of section 547(b)(2) of the Bankruptcy Code to the extent that it secured prior advances in the amount of $15,000.00.
The second issue before the Court is whether the sums advanced by Frey after the perfection of the Mortgage constitute transfers intended by the Debtors and Frey to be contemporaneous exchanges for new value given to the Debtors and in fact were substantially contemporaneous exchanges for new value within the meaning of 11 U.S.C. section 547(c)(1).
Section 547(c)(1) of the Bankruptcy Code provides in pertinent part:

(c) The trustee may not avoid under this section a transfer 
(1) to the extent that such transfer was
(A) intended by the debtor and the creditor to or for whose benefit such transfer was made to be a contemporaneous exchange for new value given to the debtor; and
(B) in fact a substantially contemporaneous exchange. . . . 
The parties agree that after the perfection of the Mortgage on December 4, 1992, Frey made additional advances to the Debtors aggregating $47,182.73.
Pursuant to 547(a)(2) of the Bankruptcy Code:

`[N]ew value' means money or money's worth in goods, services, or new credit, or release by a transferee of property previously transferred to such transferee in a transaction that is neither void nor voidable by the debtor or the trustee under any applicable law, including proceeds of such property, but does not include an obligation substituted for an existing obligation. . . .
The parties agree that the Note provided for additional advances by Frey to the Debtors in an amount not to exceed $30,000.00 to be secured by the Mortgage. As each advance of funds was made by Frey to the Debtors, Frey received an increase in the amount secured by the Mortgage to the extent of each advance up to the sum of $30,000.00.
The Court concludes that to the extent that $30,000.00 in funds were advanced after the perfection of the Mortgage on December 4, 1992, the date of the transfer of the Mortgage, said advances were intended by the Debtors and Frey to be contemporaneous exchanges for new value given to the Debtors and in fact were substantially contemporaneous exchanges within the meaning of section 547(c)(1) of the Bankruptcy Code. Therefore Frey is entitled to enforce his security interest in the Proceeds in the amount of $30,000.00.
The third issue presented is whether Frey is entitled to payment from the Proceeds of interest on the principal balance of the Note and Mortgage and for its legal fees in defense of this proceeding pursuant to section 506 of the Bankruptcy Code and certain provisions of the Mortgage.
Section 506(b) of the Bankruptcy Code provides in pertinent part:

(b) To the extent that an allowed secured claim is secured by property the value of which, after any recovery under subsection (c) of this section, is greater *498 than the amount of such claim, there shall be allowed to the holder of such claim, interest on such claim, and any reasonable fees, costs, or charges provided for under the agreement under which such claim arose.

11 U.S.C. section 506(b).
As agreed by the parties, the Note provided for the payment of interest to Frey at the rate of 7.5% per annum which was secured by the Mortgage.
Frey asserts and the Trustee does not dispute that the value of the Proceeds that are being held in escrow, is greater than the amount of Frey's security interest and thus the claim of Frey is oversecured.
The Supreme Court in United States v. Ron Pair Enterprises, Inc., 489 U.S. 235, 241, 109 S.Ct. 1026, 1030, 103 L.Ed.2d 290 (1989) stated that:

The relevant phrase in § 506(b) is: `[T]here shall be allowed to the holder of such claim, interest on such claim, and any reasonable fees, costs, or charges provided for under the agreement under which such claim arose.' `Such claim' refers to an oversecured claim. The natural reading of the phrase entitles the holder of an oversecured claim to postpetition interest and, in addition, gives one having a secured claim created pursuant to an agreement the right to reasonable fees, costs, and charges provided for in that agreement. Recovery of postpetition interest is unqualified. . . .
The Trustee does not dispute that Frey is entitled to the payment of interest. Therefore the Court concludes that inasmuch as Frey's claim against the Proceeds is allowed as a secured claim in the amount of $30,000.00, Frey shall be entitled to interest at the rate provided in the Note and Mortgage at 7.5% per annum. The Court concludes that the rate of interest of 7.5% per annum is reasonable and in conformity with current interest rates.
Frey also seeks an award of legal fees as the holder of an oversecured claim pursuant to 11 U.S.C. section 506(b).
Under section 506(b) of the Bankruptcy Code, the holder of an oversecured claim is entitled to an award of legal fees only if and to the extent that the agreement under which the claim arose provides for such a recovery and the legal fees are reasonable. See United States v. Ron Pair Enterprises, Inc., 489 U.S. 235, 241, 109 S.Ct. 1026, 1030, 103 L.Ed.2d 290 (1989) ("Recovery of fees, costs, and charges, however, is allowed only if they are reasonable and provided for in the agreement under which the claim arose. . . ."); In re Mills, 77 B.R. 413, 417 (Bankr.S.D.N.Y.1987).
The Mortgage provided in relevant part:
12. That if any action or proceeding be commenced (except an action to foreclose this mortgage or to collect the debt secured thereby), to which action or proceeding the mortgagee is made a party, or in which it becomes necessary to defend or uphold the lien of this mortgage, all sums paid by the mortgagee for the expense of any litigation to prosecute or defend the rights and lien created by this mortgage (including reasonable counsel fees), shall be paid by the mortgagor, together with interest thereon at the rate of six per cent. per annum and any such sum and the interest thereon shall be a lien on said premises, prior to any right, or title to, interest in or claim upon said premises attaching or accruing subsequent to the lien of this mortgage, and shall be deemed to be secured by this mortgage. In any action or proceeding to foreclose this mortgage, or to recover or collect the debt secured thereby, the provisions of law respecting the recovering of costs, disbursements and allowances shall prevail unaffected by this covenant.
The Mills Court in analyzing the same language that is contained in the Mortgage that is before the Court held that an oversecured creditor could recover legal fees pursuant to section 506(b) of the Bankruptcy Code because the mortgage agreement expressly provided for an award of legal fees. In re Mills, 77 B.R. 413 (Bankr.S.D.N.Y.1987).
The Mortgage herein provides that Frey may recover legal fees for actions or proceedings in which "the mortgagee is made a party, or in which it becomes necessary to *499 defend or uphold the lien of this mortgage" and for "any litigation to prosecute or defend the rights and lien created by this mortgage. . . ."
The instant proceeding to avoid Frey's lien pursuant to section 547(b) of the Bankruptcy Code is a proceeding in which it is necessary for Frey to defend or uphold the lien created by the Mortgage and therefore the Court concludes that Frey is entitled to an award of legal fees. Upon proper application, the Court will determine the amount of fees to be awarded.
For the reasons set forth, the Court hereby grants the Trustee's Motion to avoid Frey's lien on the Proceeds in the amount of $15,000.00 and denies the remainder of the Trustee's Motion.
Further the Court grants Frey's Cross-Motion in so far as (1) Frey shall retain a security interest in the Proceeds in the amount of $30,000.00; (2) Frey shall be entitled to interest at the rate of 7.5% per annum from the date of said advances; and (3) Frey shall be entitled to an award of legal fees, the amount to be determined upon further application to the Court.
SO ORDERED.
NOTES
[1]  The Court has jurisdiction over this case pursuant to sections 1334, 157(a) and 157(b)(1) of title 28, United States Code ("title 28") and the order of referral of matters to the bankruptcy judges by the United States District Court for the Eastern District of New York (Weinstein, C.J., 1986). This is a core proceeding pursuant to sections 157(b)(2)(A), (F) and (O) of title 28.
