This suit involves an issue of first impression in this circuit. We are asked to define the word “value” as used in 11 U.S.C. § 547(c)(5). We affirm the bankruptcy court and district court in their use of “cost” as the proper measurement in this case. However, we remand this case for further proceedings to determine the precise amount of the preference payment that the defendant received.
I.
The present action is by the trustee in bankruptcy under 11 U.S.C. §§ 547(b) and (c)(5) (1986), to recover preference payments received by the defendant. Ebbler Furniture and Appliance, Inc. (“Ebbler”), filed a voluntary petition for relief pursuant to the Chapter 7 liquidation provisions of the Bankruptcy Code.
The appellant, Alton Bank & Trust Co. (“the Bank”), was the inventory financier for Ebbler. Although the security agreement is not in the record, it appears that the security agreement granted the Bank a security interest in Ebbler’s inventory, and accounts receivable. The record is unclear as to whether the security interest covered proceeds and whether it was properly perfected.
The bankruptcy court made the following factual findings. Purchases made by the debtor within ninety days prior to bankruptcy totaled $170,911.33. The cost of goods sold during the ninety day period equaled $214,065.19. The ending inventory, as of the date of filing bankruptcy, was $67,000.00. The cost of the beginning inventory ninety days prior to the filing of the bankruptcy was calculated by the bankruptcy court in the following manner.
cost of goods sold ($214,065.19)
+ ending inventory ($ 67,000.00)
— purchases ($170,911.33)
beginning inventory $110,000.00
The bankruptcy court also found that there were $19,000 worth of accounts receivable, subject to the Bank’s security interest. These receivables were added to beginning inventory. The bankruptcy court then concluded:
12. On the basis on [sic] the foregoing figures, the creditor Bank received a preference as described in 11 U.S.C. § 547(c)(5) of approximately $75,000.00, i.e., the difference between what the Bank received on account of the debt it was owed ($204,571.61), less the debtor’s beginning inventory ($110,000.00) and its accounts receivable ($19,000).
*89In re Ebbler Furniture & Appliances, Inc., No. 84-0150 (Bankr.S.D.Ill.1985) (unpublished order).
The bankruptcy court noted that a discrepancy existed in the amount of $15,000 as to the value of the ending inventory. Consequently, the bankruptcy court reduced the preference by $15,000.00, and found a preference of $60,000.00.
Beginning approximately three to four months before filing its petition, Ebbler conducted a going out of business sale. Ebbler ceased doing business on November 30, 1983. At that time Ebbler was indebted to the Bank in the amount of $50,000 and had $67,000 in inventory (valued on a cost basis). The Bank repossessed $50,000 worth of inventory and sold it at cost applying the $50,000 proceeds to the debt.
Finally, and perhaps most important for purposes of this appeal, the bankruptcy court determined that the parties “were relying on the cost basis of the inventory in evaluating the security for the indebtedness.” Id.
II.
A.
When a court reviews a bankruptcy court decision on appeal the court must adopt the bankruptcy court’s findings of fact unless clearly erroneous. In re Kimzey, 761 F.2d 421, 423 (7th Cir.1985); In re Evanston Motor Company, Inc., 735 F.2d 1029, 1031 (7th Cir.1984). The clearly erroneous rule does not apply to review of the bankruptcy court’s conclusions of law. In re Kimzey, 761 F.2d 421, 423 (7th Cir.1985).
This case involves a mixed question of fact and law. The definition of value in § 547(e)(5) is a legal question, which depends on factual determinations made by the bankruptcy court. The factual determinations are subject to the clearly erroneous standard; but the manner in which these factual conclusions implicate the legal definition of value is subject to a de novo review. We note, however, that by deferring to these initial factual determinations, subject to review by the district courts, we are not abdicating our role as the reviewer of the definition of value adopted by the lower courts.
B.
The issue presented is the interpretation of “value” as used in § 547(c)(5) of the Bankruptcy Code.1 Section 547(c)(5) applies to situations where a secured creditor does not have sufficient collateral to cover his outstanding debt. Subparagraph five (5) codifies the “improvement in position test” and overrules an earlier line of cases such as Grain Merchants of Indiana, Inc. v. Union Bank & Savings Co., 408 F.2d 209 (7th Cir.), cert. denied, 396 U.S. 827, 90 S.Ct. 75, 24 L.Ed.2d 78 (1969). Section 547(c)(5) prevents a secured creditor from improving its position at the expense of an unsecured creditor during the 90 days prior to filing the bankruptcy petition. See generally 4A Collier on Bankruptcy ¶ 547.41, p. 547-133 (15th ed.).
The first step in applying section 547(c)(5) is to determine the amount of the loan outstanding 90 days prior to filing and the “value” of the collateral on that day. The difference between these figures is *90then computed. Next, the same determinations are made as of the date of filing the petition. A comparison is made, and, if there is a reduction during the 90 day period of the amount by which the initially existing debt exceeded the security, then a preference for section 547(c)(5) purposes exists. See generally 4A Collier on Bankruptcy 11547.41. The effect of 547(c)(5) is to make the security interest voidable to the extent of the preference. Id. at p. 547-134. Of course, if the creditor is fully secured 90 days before the filing of the petition, then that creditor will never be subject to a preference attack. Id.; see also Matter of Missionary Baptist Foundation, 796 F.2d 752, 760 n. 11 (5th Cir.1986).
C.
The language of section 547(c)(5), the “value of all security interest for such debt,” was purposely left without a precise definition. See generally H.R. No. 595, S.Rep. No. 989, 95th Cong., 2d Sess., reprinted in 1978 U.S.Code Cong. & Ad. News, 5787, 6176; N. Cohen, “Value” Judgments: Account Receivable Financing and Voidable Preferences Under the New Bankruptcy Code, 66 Minn.L.Rev. 639, 653 (1982) (hereinafter “Cohen”); In re Beattie, 31 B.R. 703, 714 (W.D.N.C.1983). Furthermore, it has been persuasively argued that the other Bankruptcy Code sections’ definitions of “value” would not be useful for section 547(c)(5) purposes. Cohen, supra, at 651-654. Thus, the only legislative guidance is “that we are to determine value on case-by-case basis, taking into account the facts of each case and the competing interests in the case.” Matter of Lackow Bros., Inc., 752 F.2d 1529, 1532 (11th Cir.1985), citing H.R. Rep. No. 545, 95th Cong., 1st Sess. 356 (1977) reprinted in 1978 U.S.Code Cong. & Ad.News 5787, 6312.
The method used to value the collateral is crucial in determining whether or not the bank received a preference. The Bank urges that we adopt an “ongoing concern” 2 value standard, which, in this case, would be cost plus a 60% mark-up. The Bank relies on Lackow Bros., supra, as authority for the use of this definition of value. We find Lackow Bros, readily distinguishable. There, the only evidence of value before the court was ongoing concern value. As the Eleventh Circuit stated: “The only evidence in the record of value for the ninetieth day prior to the filing of the bankruptcy is the ongoing concern value; therefore, this is the only standard of valuation that can be applied to determine if Creditor’s position improved_” Lack-ow Bros, at 1532.
Another view as to how value should be defined is proposed by Professor Cohen. He proposes an after-the-fact determination of value. In his article discussing accounts receivable, Cohen argues that the courts should look at the actual manner in which the collateral was liquidated, i.e. cost or ongoing concern. Whatever method is used to dispose of the collateral, Cohen argues, should be used to value the collateral 90 days before the filing of the bankruptcy petition. Cohen, supra, at 664. At least one circuit has found Cohen’s reasoning useful, though not necessarily adopting it as a rigid rule. Matter of Missionary Baptist Foundation, 796 F.2d 752, 761-62 (5th Cir.1986).
In Missionary Baptist Foundation, supra, the appellate court remanded to the district court for factual determinations as to whether or not the bank improved its position during the preference period. Id. *91at 761. The court noted, however, that merely remanding for factual findings may not be sufficient in light of the ambiguous meaning of “value” in section 547(c)(5). Id. at 761-62. The Fifth Circuit quoted with approval Cohen’s admonition of an individualized approach in defining value and his hindsight solution of the problem. We follow the Fifth Circuit’s lead and hold that under Section 547(c)(5) value should be defined on a case by case basis, with the factual determinations of the bankruptcy court controlling.
D.
In the present case we affirm the bankruptcy court's use of cost as the method for valuing the collateral for 547(c)(5) purposes. The bankruptcy court found that the parties were using a cost basis for valuing the security. Furthermore, when the Bank removed inventory with a cost of approximately $50,000, about a week before the petition was filed, Ebbler was given credit for that amount — $50,000. We do not find the bankruptcy court’s factual findings so clearly erroneous as to warrant reversal. In re Kimzey, 761 F.2d 421, 423 (7th Cir.1985).
Using these factual findings the bankruptcy court applied cost as the legal definition of “value.” We affirm the use of this definition as applied to these facts.
III.
We remand to the bankruptcy court, however, for a determination as to the amount of the preference. The bankruptcy court found, weighing the conflicting evidence, that a preference of $60,000 existed. It is not clear why the bankruptcy court did not consider the $43,000 in cash which the debtor had in hand at the time of filing the bankruptcy petition.
The bankruptcy court held that the Bank had a security interest in the inventory and accounts receivable. The bankruptcy court’s opinion is silent as to whether or not this security agreement covered cash proceeds, and whether or not the $43,000 in actuality was cash proceeds of the inventó-ry. It must also be determined if these interests were properly perfected. The only evidence in the record is Mr. Ebbler’s testimony that all the proceeds from sales of inventory were deposited into an account at the Bank. The bank statement shows that on the 90th day prior to the bankruptcy the account contained $43,000. Depending on the court’s findings on these issues an adjustment downward in the amount of the preference might be appropriate.
IV.
For the reasons set forth we affirm the use of cost as a basis for defining value in section 547(c)(5) of the Bankruptcy Code. We remand, however, for a determination as to how the debtor’s cash on hand affected the preference amount.