
    In the Matter of DON’S ELECTRIC, INC., Debtor. CITY BANK AND TRUST COMPANY OF PORTAGE, Plaintiff, v. DON’S ELECTRIC, INC., United States Fidelity & Guaranty Company and A. Victoria Eherenman, in her capacity as trustee in bankruptcy, Defendants.
    Adv. No. 84-0238-7.
    United States Bankruptcy Court, W.D. Wisconsin.
    July 23, 1986.
    
      Michael P. May, Madison, Wis., Board-man, Suhr, Curry & Field, for plaintiff.
    Patricia M. Gibeault, Brynelson, Herrick, Bucaida, Dorschel & Armstrong, Madison, Wis., for defendant U.S. Fidelity & Guar. Co.
   MEMORANDUM DECISION

ROBERT D. MARTIN, Chief Judge.

Don’s Electric, Inc. (“Don’s”), a prime contractor on a number of construction projects, filed its chapter 7 petition in bankruptcy on September 7, 1982. The plaintiff, City Bank & Trust Co. of Portage (“the bank”), made several business loans to Don’s prior to bankruptcy. A perfected security agreement grants the bank a first security interest in Don’s “general intangibles, accounts, [and] contract rights ... whether now owned or hereafter acquired ... and all proceeds and products of the foregoing....” Accordingly the bank claims first priority in certain retainages and other amounts owing under contracts relating to projects which Don’s failed to complete. United States Fidelity and Guaranty Company (“USF & G”), which was the surety on. the projects, claims priority by virtue of its subrogation to the rights of the subcontractors and material suppliers which it paid after Don’s defaulted.

This controversy has been submitted on stipulated facts and appears ripe for summary judgment. The parties have filed briefs and exhibits in support of their positions. The questions of law to be resolved are whether the bank’s security interest attaches to the disputed funds, and whether by virtue of subrogation USF&G has superior rights in the funds notwithstanding the bank’s perfected security interest and its own failure to perfect its subrogation rights under the UCC.

I.

The bank’s right to the disputed funds is initially dependent on its having acquired a valid security interest in the funds. As noted, the security agreement between Don’s and the bank granted the bank a security interest in all of Don’s contract rights, accounts receivable and related proceeds. USF & G argues that the bank’s security interest has not attached to the funds in question because Don’s has no rights in the funds. See WIS.STAT. § 409.203(l)(c). Don’s obtained contract rights at the time it entered into binding agreements with the project owners. Don’s'contract rights “matured” into accounts receivable after Don’s rendered, and the project owners accepted, performance on the respective phases of the construction. Thus, Don’s obtained “rights” in the funds within the meaning of the UCC, particularly as to those portions of the contract proceeds which constituted unpaid progress payments or retainage for work completed. The bank’s security interest attached to the contract rights, accounts and proceeds at the same time Don’s acquired the rights. WIS.STAT. § 409.203. See generally In Re Chicago, Madison & Northern Ry. Co., 36 B.R. 292 (Bankr.W.D.Wis.1984) (discussing nature of lienor’s rights in collateral required for security interest to attach). USF & G is incorrect in asserting that the bank has “no rights” in the disputed funds.

USF & G argues, however, that the accounts and their proceeds are subject to a trust in favor of the subcontractors and materialmen. WIS.STAT. § 779.16 provides:

Theft by contractors. All moneys, bonds or warrants paid or to become due to any prime contractor or subcontractor for public improvements are a trust fund only in the hands of the prime contractor or subcontractor and shall not be a trust fund in the hands of any other person. The use of the moneys by the prime contractor or subcontractor for any purpose other than the payment of claims on such public improvement, before the claims have been satisfied, constitutes theft by the prime contractor or subcontractor and is punishable under s. 943.20. This section shall not create a civil cause of action against any person other than the prime contractor or subcontractor to whom such moneys are paid or become due. Until all claims are paid in full, have matured by notice and filing or have expired, such money, bonds and warrants shall not be subject to garnishment, execution, levy or attachment.

WIS.STAT. § 779.16. The law is clear that the trust is created only with respect to funds actually in the hands of the prime contractor. See Visser v. Koenders, 6 Wis.2d 535, 537, 95 N.W.2d 363 (1959); Hribar Trucking, Inc. v. State, 22 Wis.2d 431, 126 N.W.2d 52 (1964). It is undisputed that none of the funds in dispute ever came into Don’s possession. Thus no trust fund rights exist which prevent attachment of the bank’s security interest to the proceeds. The bank’s security interest attaches to the disputed funds.

II.

USF & G contends that even if the bank has a valid security interest in the funds, the bank’s rights are inferior to USF & G’s rights as subrogee to the subcontractors it paid. As noted above there is no trust fund in the subcontractors’ favor since none of the disputed proceeds ever came into Don’s hands. Thus, USF & G cannot be subrogated to any subcontractor trust fund rights.

Similarly, it is stipulated that except in two instances none of the subcontractors on the various projects ever perfected their lien rights according to statute. See WIS. STAT. § 779.01 et seq. On the unliened jobs, even if such “lien rights” could have taken priority in the disputed funds, there are no actual lien rights to which USF & G may be subrogated. Rather, USF & G is subrogated to the mere unsecured claims of the subcontractors it paid.

Although USF & G is not benefitted by virtue of being subrogated to subcontractor claims, it is unquestionably benefit-ted by being subrogated to the rights of the project owners. WIS.STAT. § 409.318 provides:

(1) Unless an account debtor has made an enforceable agreement not to assert defenses or claims arising out of a sale as provided in s. 409.206 the rights of an assignee are subject to:
(a) All the terms of the contract between the account debtor and assignor and any defense or claim arising therefrom; and
(b) Any other defense or claim of the account debtor against the assignor which accrues before the account debtor receives notification of the assignment.

WIS.STAT. § 409.318(1). Under the law the assignee of an account obtains nothing more than the assignor had, and all defenses which could have been raised by the account debtor against the assignor are available against the assignee. See Gould v. Jackson, 257 Wis. 110, 42 N.W.2d 489 (1950); Morris F. Fox & Co. v. State, 229 Wis. 44, 49, 281 N.W. 666 (1938); Michalak v. Nowinski, 220 Wis. 1, 7, 264 N.W. 498 (1936). The assignee stands exactly in the shoes of his assignor. Gould, supra, 257 Wis. at 112-13. See also Allison v. Manzke, 118 Wis. 11, 94 N.W. 659, 662 (1903). Accord First Federal State Bank v. Town of Malvern, 270 N.W.2d 818 (Iowa 1978) (bank to which a defaulting contractor had assigned its rights prior to default acquired only such rights as the contractor had in unpaid progress payments and re-tainages). Thus, while the bank’s security interest attaches to the accounts and their proceeds (WIS.STAT. § 409.203), the security interest is subject to all counterclaims, defenses and set-offs which the project owners could assert against Don’s. It cannot be doubted that the project owners had the right to set off the expense of completing the work left unfinished by Don's against any amounts owing under the contracts. That is in fact the principal purpose of the retainages. By virtue of completing the projects USF & G is subrogated to the position of the owners and acquires all the rights, defenses and claims which the owners could have asserted against Don’s. National Shawmut Bank of Boston v. New Amsterdam Cos. Co., 411 F.2d 843 (1st Cir.1969). See Prairie State Nat. Bank v. United States, 164 U.S. 227, 232, 17 S.Ct. 142, 144, 41 L.Ed. 412 (1896); First Federal State Bank, supra, 270 N.W.2d at 821. As subrogee, USF & G has the same right as the project owners to offset the amounts owing to Don’s by the cost of completing the projects. First Federal State Bank, 270 N.W.2d at 822.

III.

The bank argues however, that USF & G’s subrogation rights are the equivalent of an Article 9 “security interest” and that since USF & G never perfected its interest the bank’s security interest takes priority. See WIS.STAT. § 409.301 et seq. USF & G argues that subrogation rights are not subject to the provisions of Article 9 of the UCC. The majority view, and the better rule of law, appears to be that a right of subrogation is not an “assignment” or “security interest” subject to Article 9.

Although a few Wisconsin cases suggest that a surety’s right of subrogation is dependent upon the surety contract, see e.g. Joint School District v. Bailey-Marsh Co., 181 Wis. 202, 214, 194 N.W. 171 (1923), it is reasonably clear that in Wisconsin, as elsewhere, subrogation does not principally arise from contractual obligations but is rather an equitable doctrine designed to accomplish substantial justice. See In Re Dorr Pump & Mfg. Co., 39 F.Supp. 295 (E.D.Wis.1941), affirmed 125 F.2d 610 (7th Cir.1942); St. Paul Mercury Indemnity Co. v. Somers, 274 Wis. 221, 225, 79 N.W.2d 670 (1956); Hamill v. Kuchler, 203 Wis. 414, 424-25, 232 N.W. 877 (1931); Poluckie v. Wegenke, 137 Wis. 433, 119 N.W. 102 (1908); Charmley v. Charmley, 125 Wis. 297, 103 N.W. 1106 (1905). Inherent in the suretyship arrangement is the surety’s right to use unpaid contract amounts to offset the losses it incurs in paying claims and completing the project. See Prarie State Nat. Bank, supra, 164 U.S. at 231, 17 S.Ct. at 144; Joint School District, supra, 181 Wis. at 211-12. Article 9 by contrast applies only to security interests created by contract.

Commercial reality dictates that the surety’s subrogation rights not be subject to Article 9 filing requirements. The impracticality of filing has been noted. See E. Cushman, Surety’s Right of Equitable Priority, 39 Temple L.Q. 239, 251 (1966). The bank is not prejudiced by the fact that the surety’s subrogation rights need not be perfected. All construction lenders act in full awareness that the borrowers accounts are highly contingent in the event of default. Similarly, banks are fully aware that all major projects are covered by surety bonds. There is no element of surprise if the non-filing surety asserts its inherent right to use contract proceeds to offset the cost of rectifying the contractor’s default. From the above discussion it is clear that Wisconsin law does not subject subrogation rights to the priority scheme established in Article 9.

IV.

The appendix to this memorandum details the specific amounts in dispute. The parties agree that the bank is to receive all proceeds from the Portage School project. In the case of the Cuba City, Divine Savior, Richland Jail, Taycheedah Prison, Turkey Research, and Green County Jail projects the amount expended by USF & G to complete the projects exceeds the total remaining contract proceeds. Under the principles discussed above, USF & G is clearly entitled to recover the full amount of remaining contract proceeds from each project. USF & G is also entitled to receive the amount expended to complete the Sparta Library project ($846.00). Since the amount paid to subcontractors for work completed prior to default ($165.95) is stipulated to have not constituted a valid lien against the project, it may be inferred that the city of Sparta was under no legal obligation to pay that amount. Accordingly, USF & G has no valid right of set-off against the bank to which it can be subro-gated. The bank is entitled to all proceeds of the Sparta project in excess of $846.00.

A total of $37,601.02 in contract proceeds remains from the Grede Foundries project. USF & G paid $31,895.50 to complete the project, and $28,609.30 to pay previously unpaid subcontractors. Prior subcontractor claims totalling $7,041.22 were secured by virtue of the filing of lien notices. Under the terms of the Grede contract, Don’s was required to indemnify Grede for any subcontractor claim which “has or may become a charge against [Gre-de] or its property.” (Exhibit C, Grede Contract at 11-15.) USF & G is subrogated to Grede’s defenses and counterclaims arising from these lien claims as well as from Don’s other acts of default. See WIS. STAT. § 409.318, supra. Costs of completion plus the two prior lien claims total $38,936.72. This amount exceeds the $37,-601.02 of available proceeds. USF & G is entitled to the full balance.

In summary, USF & G is entitled to receive all remaining contract proceeds from the Cuba City, Divine Savior, Grede Foundries, Richland Jail, Taycheedah, Turkey Research, and Green County projects and $846.00 from the Sparta project. The bank is entitled to receive $2,927.50 from the Sparta project and $777.55 from the Portage Schools project. 
      
      . A chart detailing the disputed amounts is provided in an appendix to this decision.
     
      
      . The trustee has abandoned any interest in the disputed funds.
     
      
      . Under WIS. STAT. § 409.106 an account is "any right to payment for goods sold or leased or for services rendered which is not evidenced by an instrument or chattel paper, whether or not it has been earned by performance.”
     
      
      . WIS. STAT. § 409.203 provides:
      
        Attachment and enforceability of security interest; proceeds; formal requisites. (1) Subject to s. 404.208 on the security interest of a collecting bank and s. 409.113 on a security interest arising under ch. 402, a security interest is not enforceable against the debtor or 3rd parties with respect to the collateral and does not attach unless:
      (a)The collateral is in the possession of the secured party pursuant to agreement, or the debtor has signed a security agreement which contains a description of the collateral and in addition, when the security interest covers crops growing or to be grown or timber to be cut, a description of the land concerned; and
      (b) Value has been given; and
      (c) The debtor has rights in the collateral.
      (2) A security interest attaches when it becomes enforceable against the debtor with respect to the collateral. Attachment occurs as soon as all of the events specified in sub.
      (1) have taken place unless explicit agreement postpones the time of attaching.
      (3) Unless otherwise agreed a security agreement gives the secured party the rights to proceeds under s. 409.306.
      (4) A transaction, although subject to this chapter, is also subject to chs. 138, 421 to 427, s. 182.025, or any other similar statute which may be applicable to the particular transaction, and in the case of conflict between this chapter and any such statute, such statute controls. Failure to comply with any applicable statute has only the effect which is specified therein.
     
      
      . The analagous section governing private construction projects is WIS.STAT. § 779.02(5) which provides in relevant part:
      [A]1I moneys paid to any prime contractor or subcontractor by any owner for improvements, constitute a trust fund only in the hands of the prime contractor or subcontractor to the amount of all claims due or to become due or owing from the prime contractor or subcontractor for labor and materials used for the improvements, until all the claims have been paid, and shall not be a trust fund in the hands of any other person. The use of any such moneys by any prime contractor or subcontractor for any other purpose until all claims ... have been paid ... is theft by the prime contractor ... and is punishable under s. 943.20.
     
      
      . Under Wisconsin law the funds held by Don’s trustee in bankruptcy are not considered to be held by Don’s so as to create the statutory trust. See Visser v. Koenders, supra.
      
     
      
      . This view of section 409.318 is re-enforced by the official UCC comment to the section which states in relevant part:
      Subsection (1) makes no substantial change in prior law. An assignee has traditionally been subject to defenses or set-offs existing before an account debtor is notified of the assignment.
      WIS.STAT. ANNO. § 409.318 Official UCC Comment.
     
      
      . See e.g. National Shawmut Bank, supra; First Federal State Bank, supra; Finance Co. of America v. U.S. Fidelity & Guaranty Co., 277 Md. 177, 353 A.2d 249 (1976); First Vermont Bank & Trust Co. v. Village of Poultney, 134 Vt. 28, 349 A.2d 722 (1975); Canter v. Schlager, 358 Mass. 789, 267 N.E.2d 492 (1971); Jacobs v. Northeastern Corp., 416 Pa. 417, 206 A.2d 49, 55 (1965). See also B. Clark, Suretyship in the UCC, 46 Tex.L.Rev. 453 (1968); E. Cushman, Surety’s Right of Equitable Priority, 39 Temple L.Q. 239 (1966).
     
      
      . Subrogation is specifically intended to prevent unjust enrichment. Homeowners' Loan Corp. v. Papara, 241 Wis. 112, 120, 3 N.W.2d 730 (1942); St. Paul Mercury Indemnity, supra. The doctrine of subrogation is properly applied when a party other than a mere volunteer pays a debt which in equity and good conscience should be paid by another party, who apart from subrogation will be unjustly enriched. D’Angelo v. Cornell Paperboard Products Co., 19 Wis.2d 390, 399-400, 120 N.W.2d 70 (1963); St. Paul Mercury Indemnity, supra.
      
     
      
      . Thus the rule is clear that a creditor owes a known surety the duty to indulge in no transactions with the principal that will vary or jeopardize the surety’s position. City of Wawautosa v. Volpano, 224 Wis. 503, 509, 272 N.W. 459 (1937). See Joint School District, supra 181 Wis. at 211, 194 N.W. 171.
     
      
      . Section 409.102(2) provides:
      (2) This chapter applies to security interests created by contract including pledge, assignment, chattle mortgage, chattel trust, trust deed, factor’s lien, equipment trust, conditional sale, trust receipt, other lien or title retention contract and lease or consignment intended as security. This chapter does not apply to statutory liens except as provided in s. 409.310.
     
      
      .That this result is in accord with the policy of the UCC is highlighted by the deliberate omission of proposed section 9-312(7) from the original draft of the UCC at the behest of the surety industry. The industry vehemently argued that the section would work a radical alteration of the position of sureties vis-a-vis banks that would overturn a century of case law throughout the country. See Recommendations of Editorial Board for changes in the text and comments of the Uniform Commercial Code (April 30, 1953), discussed in Cushman, Surety's Right of Equitable Priority, supra, 39 Temple L.Q. at 246-48. By accepting this deletion, the Wisconsin legislature has indicated its adherence to the majority rule taking subrogation rights out of Article 9. See footnote 8, supra.
      
     
      
      . It appears from the record that USF & G may have expended more than the amount of its bond to complete the Grede project. It could be argued that any payment over the face amount of the bond was voluntary and thus does not create a right of subrogation. See Hamed v. Milwaukee County, 108 Wis.2d 257, 321 N.W.2d 199 (1982); Rock River Lumber Corp. v. Universal Mortg. Corp. of Wisconsin, 82 Wis.2d 235, 262 N.W.2d 114 (1978). However as a practical matter USF & G, having undertaken to complete the project, was obligated to pay the full completion costs. Further, USF & G would have no right of subrogation whatever until Grede was fully indemnified for its losses. Garrity v. Rural Mut. Ins. Co., 77 Wis.2d 537, 253 N.W.2d 512 (1977). Thus USF & G was not a “mere volunteer" as to the sums in excess of its liability on the bonds and is properly subrogated to the full amount of the remaining contract proceeds.
     