
11 B.R. 900 (1981)
In re SOUTHWEST PENNSYLVANIA NATURAL RESOURCES, INC., Debtor.
WESTINGHOUSE CREDIT CORPORATION, Plaintiff,
v.
SOUTHWEST PENNSYLVANIA NATURAL RESOURCES, INC., and Beckwith Machinery Company, Defendants.
Bankruptcy No. 80-862, Adv. No. 80-1009.
United States Bankruptcy Court, W.D. Pennsylvania.
June 17, 1981.
Michael J. Yurcheshen, Pittsburgh, Pa., for Westinghouse Credit Corp.
Stephen J. Laidhold, Pittsburgh, Pa., for Beckwith Machinery Co.
Robert O. Lampl, Pittsburgh, Pa., for Southwest Pa. Natural Resources, Inc.
Donald R. Calaiaro, Pittsburgh, Pa., trustee.

MEMORANDUM OPINION
JOSEPH L. COSETTI, Bankruptcy Judge.
On June 6, 1980 Southwest Pennsylvania Natural Resources, Inc. (hereafter "Southwest") *901 filed a voluntary petition under Chapter 11 of the Bankruptcy Code. On petition by the creditor, Westinghouse Credit Corporation (hereafter "Westinghouse"), this case was converted to a Chapter 7 of the Bankruptcy Code on December 16, 1980.
The pertinent facts are the following:
A) On March 1, 1977, in order to finance a sale, Beckwith executed a Security Agreement with R.S. Sinclair Contracting, Inc., d/b/a C & A Coal Co. (hereafter "Sinclair"). The equipment listed as collateral was:
1) one Caterpillar D9H tractor, S/N 90V4627;
2) one Caterpillar 769B truck S/N 99F6043;
3) one Caterpillar 769B truck S/N 99F6243;
4) one Caterpillar D9G tractor S/N 66A3002
These security interests were perfected on February 28, 1977.
B) On March 1, 1977 Beckwith assigned the above Security Agreement to Westinghouse.
C) On July 26, 1977 Beckwith entered into a Security Agreement with C & A Coal Company. The collateral for this loan allegedly included the equipment subject to the March 1, 1977 agreement assigned to Westinghouse. Financial statements were filed on July 29 and August 1, 1977.
D) On October 21, 1977 and April 27, 1978 Sinclair entered into Security Agreements with Westinghouse for the refinancing of the equipment subject to the March 1, 1977 agreement and four additional pieces. The equipment listed as collateral was:
1) one Caterpillar D9H tractor S/N 90V4627;
2) one Caterpillar 769B truck S/N 99F6043;
3) one Caterpillar 769B truck S/N 99F6243;
4) one Caterpillar D9G tractor S/N 66A3002;
5) one Caterpillar D8K S/N 77V2965;
6) one Caterpillar D8K S/N 77V2741;
7) one Caterpillar D9G S/N 66A2512;
8) one unit H201C S/N 68048 (this was sold by the seller in November, 1978)
Westinghouse filed financing statements on the above pieces on October 25, 1977, May 1, 1978, and May 2, 1978.
E) On November 28, 1978 Sinclair transferred the above collateral (except the H201C unit) to Southwest. Westinghouse filed financing statements on these pieces on December 1, 4, and 20, 1978. It is alleged that this transfer was subject to the rights of Westinghouse.
F) On October 10, 1980 Westinghouse sold three of the four pieces of equipment subject to the March 1, 1977 Security Agreement and recovered $210,000 or $315,000 (the parties have not supplied this Court with the correct figures). Of this recovered amount $20,500 was deposited in an escrow account until the claims of Westinghouse and Beckwith are resolved.
G) On November 20, 1980 Westinghouse filed a Complaint for Declaratory Judgment, alleging that Westinghouse has a Security Agreement subject to the March 1, 1977 agreement which is prior and superior to the interest of Beckwith.
DISCUSSION
In order for a security interest to be valid under the Uniform Commercial Code, both attachment and perfection must occur. A security interest or attachment arises upon the last of three events: 1) When a creditor gives value; 2) when a creditor and debtor enter into an agreement for the debtor to give a security interest to the creditor; and 3) when the debtor has interests in the property being secured. Perfection is accomplished upon the filing of a financing statement as provided in § 9-402. It is immaterial which of the two steps, attachment or perfection, occurs first; perfection occurs upon the last of these two steps. In the instant case, both parties have fully perfected their respective security interests.
The present dispute between the parties involves conflicting security interests in collateral. 12A Pa.C.S. § 9-312(5) deals with *902 the situation where there are conflicting security interests.
(5) In all cases not governed by other rules stated in this section (including cases of purchase money security interest which do not qualify for the special priorities set forth in subsections (3) and (4) of this section), priority between conflicting security interest in the same collateral shall be determined as follows:
(a) in the order of filing if both are perfected by filing, regardless of which security interest attached first under Section 9-204(1) and whether it attached before or after filing;
(b) in the order of perfection, unless both are perfected by filing, regardless of which security interest attached first under Section 9-204(1) and, in the case of a filed security interest, whether it attached before or after filing; and
(c) in the order of attachment under Section 9-204(1) so long as neither is perfected.
Comment four to § 9-312 states:
"The justification for the rule lies in the necessity of protecting the filing system  that is, of allowing the secured party who has first filed to make subsequent advances without each time having, as a condition of protection, to check for filings after this."
The general rule  first in time, first in right  is still in effect under U.C.C. § 9-312(5). But this subsection is not purely a race statute. The section nowhere requires that the winner be without knowledge of the competitor's claim. But if the competitor filed first or perfected first, he wins even if he knew of the other party's prior but unperfected claim. See First National Bank & Trust Co. v. Atlas Credit Corp., 417 F.2d 1081, 6 U.C.C. Rep. 1223 (10th Cir. 1969).
The crucial determinative factor in this case relates to the language in the March 1, 1977 Security Agreement between Beckwith and Sinclair. The language of the agreement was:
Buyer agrees that Seller shall have, and there is hereby granted to and created in favor of Seller, a purchase money security interest in the equipment described or mentioned in the Schedule of Equipment on the face side hereof to secure (i) the payment of the total sum hereof, (ii) all costs and expenses incurred by Seller in the collection of the same, including without limitation actual expenditures for reasonable attorney's fees and legal expenses, (iii) all future advances made by the Seller for taxes, levies, insurance and repairs to or maintenance of the collateral, and (iv) all other past, present and future direct or contingent liabilities of Buyer to Seller. (emphasis added).
If the language of clauses (iii) and (iv) is construed to be a valid future advances clause, Westinghouse would have priority over Beckwith on the basis of the March 1, 1977 assigned security interest. The Uniform Commercial Code specifically authorizes future advances clauses.
§ 9-204 After-Acquired Property; Future Advances. . . . (5) Obligations covered by a security agreement may include future advances or other value whether or not the advances or value are given pursuant to commitment (subsection (1) of Section 9-105).
However, even absent a future advances clause, where there are two valid security interests priority is determined in the order of filing regardless of which security interest attached first under § 9-204(1) and whether it attached before or after filing. As to the original equipment covered by the March 1, 1977 agreement, this is true even if further extension of credit was given and the first security interest filed contained no provision authorizing future advances. See Index Store Fixture Co. v. Farmers' Trust Co., 19 U.C.C. Rep. 284 (Mo.1976).
The defendant relies heavily upon Coin-O-Matic Service Co. v Rhode Island Hospital Trust Co., 3 U.C.C. Rep. 1112 (R.I.Super. Ct.1966). The Coin-O-Matic court refused to allow a prior filing to prevail over a subsequent creditor, where the security interest of the first creditor did not contain a future advances clause. The court felt that to rule differently would go against public *903 policy because it would be perilous for any second creditor to ever advance money to a debtor who already had a financing statement on file. The Uniform Commercial Code drafters reviewed the problem and rejected the view taken by the Coin-O-Matic court. The revisions to the Code expressly overruled this view. Some courts did not adopt the Coin-O-Matic view before the express revisions in the U.C.C. and held that priority on later advances dates from the first filing even though the original agreement contemplated one loan. See In re Merriman, 4 U.C.C. Rep. 234 (S.D.Ohio 1967); In re Rivet, 6 U.C.C. Rep. 460 (E.D. Mich.1969). (Pennsylvania has not adopted the 1972 Revisions.)
At present the law is clear that ". . . where originally a security agreement is executed, an indebtedness created, and a financing statement describing the collateral filed, followed at a later date by another advance made pursuant to a subsequent security agreement covering the same collateral, the lender has a perfected security interest in the collateral not only for the original debt but also for the later advance." (emphasis added). James Talcott, Inc. v. Franklin Nat. Bank of Minneapolis, 10 U.C.C. Rep. 11, 25 (Minn.1972); see also In re Rivet, supra; Mid Eastern Electronics, Inc. v. First Nat. Bank of So. Md., 7 U.C.C. Rep. 1098 (4th Cir. 1970); Cantrill Construction Co. v. Carter, 6 U.C.C. Rep. 1217 (6th Cir. 1969).
The court in the Household Finance Corp. v. Bank Commissioner of Maryland, 4 U.C.C. Rep. 809 (1967) interpreted § 9-312(5) to mean that priority between conflicting security interests is determined by the order of filing, with certain exceptions, and that to require a lender to terminate a financing statement on record and file a new one when a loan is refinanced would disrupt the priorities.
A general test applied by courts to determine whether a future advance falls within the future advances clause of a security agreement is that the future advance must be of the same class as the primary obligation and so related to it that the consent of the debtor to its inclusion may be inferred. Community Bank v. Jones, 22 U.C.C. Rep. 168 (D.Or.1977).
. . . . Even where the parties originally contemplate a single debt, secured by a single item of property or a single group of items, the secured party and the debtor may enter into further transactions whereby the debtor obtains additional credit and the secured party is granted more security. The validity of such agreements as against creditors, trustees in bankruptcy and other secured parties has been widely recognized by many courts. James Talcott, Inc. v. Franklin Nat. Bank of Minneapolis, supra at 25. See also Index Store Fixture Co. v. Farmers' Trust Co., supra; France v. Union Bank & Sav. Co., 396 U.S. 827, 90 S.Ct. 75, 24 L.Ed.2d 78 (1969); Rosenberg v. Rudnick, 4 U.C.C. Rep. 8 (Mass.1967).
A subsequent lender could protect himself by requiring the debtor, as a condition of making a loan, to utilize § 9-208 requiring a secured party to disclose to the debtor when requested the particulars of its financing agreements with him. See Plemens v. Didde-Glaser, 3 U.C.C. Rep. 1017 (D.Md. 1966) and Household Finance Corp. v. Bank Commissioner of Maryland, supra.
Furthermore, any possible doubt as to the interpretation of § 9-312(5)(a) is eliminated by the following Uniform Commercial Code Comment to that section:
The operation of subsections (5) and (6) is illustrated by the following examples. Example 4. On February 1, A makes an advance against machinery in the debtor's possession and files his financing statement. On March 1, B makes an advance against the same machinery and files his financing statement. On April 1, A makes a further advance, under the original security agreement, against the same machinery (which is covered by the original financing statement and thus perfected when made. A has priority over B both as to the February 1 advance and as to the April 1 advance and it makes no difference whether or not A knows of B's intervening advance when he makes his second advance. *904 A wins, as to the April 1 advance because he first filed even though B's interest attached, and indeed was perfected, before the April 1 advance. . . .
CONCLUSION
As to the original four pieces of equipment, the priority of Westinghouse is clear. As to the remainder, the October 21, 1977 and April 27, 1978 refinancing of Westinghouse with Sinclair was not a separate and distinct transaction; it was secured by a future advances clause of the original March 1, 1977 agreement between Beckwith and Sinclair and then assigned on March 1, 1977 by Beckwith to Westinghouse. Therefore, in applying the rule set by 12A Pa.C.S. § 9-312(5)(a), Westinghouse has a superior and prior interest in the proceeds of the collateral in question.
An appropriate Order will be entered.
