
89 B.R. 157 (1988)
In re Jack Bartlett MUIR, Blanche Ann Muir, Debtors.
In re J. Michael MORRIS, Trustee, Plaintiff,
v.
JACK B. MUIR IRREVOCABLE TRUST, Jack B. Muir and Scott Muir, Trustees, and Stockton National Bank, Defendants.
Bankruptcy No. 86-12959, Adv. No. 87-0103.
United States Bankruptcy Court, D. Kansas.
June 23, 1988.
*158 J. Michael Morris, Klenda, Mitchell, Austerman & Zuercher, Wichita, Kan., for trustee.
Calvin L. Wiebe, Triplett, Woolf & Garretson, Wichita, Kan., for Jack B. Muir Irrevocable Trust, Jack B. Muir and Scott Muir, Trustees.
William H. Zimmerman, Jr., Wallace, Dewey & Zimmerman, Wichita, Kan., for Stockton Nat. Bank.

MEMORANDUM OF DECISION
JOHN K. PEARSON, Bankruptcy Judge.
In this adversary proceeding, motions for partial summary judgment have been filed by both the plaintiff trustee and the defendants. The trustee in bankruptcy, J. Michael Morris (hereinafter "Morris"), appears personally. The defendants, Jack B. Muir Irrevocable Trust, Jack B. Muir (hereinafter "debtor" or jointly, "debtors") and Scott Muir, Trustees of the Jack B. Muir Irrevocable Trust, appear by Calvin L. Wiebe of Triplett, Woolf & Garretson, Wichita. The Stockton National Bank appears by William H. Zimmerman, Jr., of Wallace, Dewey & Zimmerman, Wichita.

FACTS
The parties have stipulated to the following facts:
1. On August 28, 1981 grantor, Eva Mae Muir, established the Jack B. Muir Trust (hereinafter "Trust").
*159 2. Trustees of the Trust were, and are, debtor and Scott M. Muir. The beneficiaries were debtor, Blanche Ann Muir (hereinafter "codebtor" or jointly, "debtors"), Scott M. Muir, Elizabeth A. Muir and Sarah C. Muir.
3. Under the powers given to the Trustee, the Trustee has unlimited ability to hold trust security or trust property in Trustee's name personally. The Trustee also has the limited power to invade the principal of the Trust for the grandchildren's health, maintenance, support or education.
4. On November 19, 1985 Jack B. Muir and Scott M. Muir as trustees of the Trust signed a promissory note to the Stockton National Bank (hereinafter "Bank"), in the amount of $65,000.00. The note indicated that it was a line of credit note to the Trust and showed on its face an advance to the Trust of $57,587.98.[1]
5. The note was secured by a real estate mortgage on the following asset of the Trust:
The Southeast Quarter (SE/4) and Northeast Quarter (NE/4) of Section Twenty (20), Township Seventeen West (T17W), Range Six South (R6S) of the Sixth Principal Meridian (6th P.M.), Rooks County, Kansas.
6. Debtor guaranteed the loan by executing a personal "Loan Guaranty Agreement" in favor of the Bank to the extent of $65,000.00.
7. On November 19, 1985 debtor executed in favor of Bank an "Assignment of Overriding Royalty." The assignment covered his royalty interests in various oil and gas leases. The assignment stated that it was given to secure all indebtedness of every nature and kind to the Bank.
8. Within one year prior to the filing of the petition, debtor paid to the Bank by check $4,011.62.
9. The transfer was to pay interest on a prior loan to the Trust.
10. The debtors' Chapter 7 petition was filed November 12, 1986.

DISCUSSION
The Trust and the Bank have filed separate motions for partial summary judgment on the turnover of runs and the marshaling issues. Morris has filed a motion for partial summary judgment on the issue of marshaling assets.[2]
The issue presented for determination is whether the Court can grant the trustee the requested equitable relief of marshaling. This appears to be a question of first impression. After reviewing the stipulated evidence and examining the briefs of the parties, the Court grants a partial motion for summary judgment in favor of Morris on this issue.

CONCLUSIONS OF LAW
Summary judgment is proper when there are no disputed material issues of fact and the issue is, in essence, a legal question. Fed.R.Civ.P. 56(c); Fed.R.Bankr. P. 7056; United States v. O'Block, 788 F.2d 1433 (10th Cir.1988). The pleadings *160 and documentary evidence are to be construed liberally in favor of the party opposing the motion for summary judgment. First Western Government Securities, Inc. v. United States, 796 F.2d 356 (10th Cir.1986). Motions for summary judgment are granted when it is clear from the record that there are no genuine issues of material fact and the movant is entitled to judgment as a matter of law. Security Insurance Co. of Hartford v. Wilson, 800 F.2d 232, 233 (10th Cir.1986). Summary judgment is improper if an inference can be drawn from the facts which would allow the nonmovant to prevail. Thomas v. United States Department of Energy, 719 F.2d 342, 344 (10th Cir.1983). Here summary judgment is proper as the parties agree that the material facts are undisputed, but do not agree on the legal effect of the facts.
The parties have stated that outcome of the adversary turns on the applicability of the equitable doctrine of marshaling.[3] Although this is a bankruptcy case and the trustee seeks to apply various federal law principles, in the absence of a federal statutory rule, the state law of marshaling applies in bankruptcy proceedings. Meyer v. United States, 375 U.S. 233, 84 S.Ct. 318, 11 L.Ed.2d 293 (1963). The Kansas Supreme Court has summarized the marshaling doctrine as follows:
[W]here a creditor has a lien on two funds in the hands of the same debtor and another creditor has a lien on only one of them, equity will compel the former to collect his debt out of that fund in his hands to which the latter cannot resort. The doctrine is an equitable one applicable only where both funds are in the hands of the common debtor of both creditors and where it can be applied with justice to all concerned and will be applied only when that can be done without prejudice to the paramount creditor. . . . [Citations omitted. Emphasis added.]
Bolman v. Commercial National Bank of Kansas City, Kansas, 173 Kan. 155, 244 P.2d 1175 (1952).
The doctrine of marshaling is designed to promote fair dealing and justice. Bankruptcy courts are courts of equity and their proceedings are inherently proceedings in equity. Local Loan Co. v. Hunt, 292 U.S. 234, 240, 54 S.Ct. 695, 697, 78 L.Ed. 1230, 1233 (1934). The Bankruptcy Code codifies the general powers of the bankruptcy court and such powers require this Court to determine whether or not to involve the doctrine of marshaling to compel the Bank to proceed against its primary obligee to satisfy the note.
Generally three elements must be found in order for a court of equity to invoke the marshaling doctrine: (1) existence of two creditors with a common debtor; (2) the existence of two funds belonging to the debtor; and (3) the legal right of one creditor to satisfy his demand from either of the funds, while the other may resort to only one fund. In re Francis Construction Company, Inc., 54 B.R. 13 (Bankr.S.C.1985). Under the facts of this case all elements are satisfied except the common debtor element.
It is well established, as part of the general rule, that both funds must be in the hands of a debtor common to two creditors. Dupage Lumber and Home Improvement v. Georgia-Pacific Corp., 34 B.R. 737 (D.C. N.D.Ill.1983). Morris argues that the common debtor requirement should not bar this Court from applying the equitable principle of marshaling. In support he cites the "independent equities exception" stated in 53 Am.Jur.2d, Marshaling Assets, §§ 11 and 23. These two sections state:
Section 11  Exceptions.
The general rule that assets will be marshaled only among creditors of a common debtor is subject to some apparent exceptions, which, however, are within its spirit. Where proof is made of independent equities from which arise a duty on the part of one debtor to pay an exoneration *161 of another, the court will enforce that duty by suggesting the fund of the principal debtor, to give effect to the equities in favor of the creditors of that debtor who is only secondarily liable for the debt.
. . . .
Section 23  Liabilities of codebtors or sureties.
Where independent equities require one codebtor to pay in exoneration of another, the court will enforce those equities for the benefit of the creditors of such other. Thus, if one of two joint debtors is primarily liable, marshaling may be enforced for the benefit of the creditors of the one who is only secondarily liable; and the creditors of the surety may compel or resort in the first instance to collateral which has been given by the principal rather than to collateral given by such surety.
A surety is not a "fund" or "security" in the sense in which those terms are used in connection with marshaling. A creditor cannot be compelled to satisfy his debt from the sureties of his debtor before resorting to a fund or collateral security on which he has a lien. Again, in the absence of some special equity, the principle of marshaling assets is not applicable to a case where one of the funds is the property of a surety of the common debtor. [Emphasis supplied.]
While the editors cite no caselaw supporting this point, a line of cases have applied marshaling, even where there was no common debtor. See In re Jack Green's Fashions for Men  Big & Tall, Inc., 597 F.2d 130 (8th Cir.1979); Matter of Dealer Support Services Intern., Inc., 73 B.R. 763 (Bankr.E.D.Mich.1987); In re Coors of North Mississippi, Inc., 66 B.R. 845 (Bankr.N.D.Miss.1986); Dupage Lumber and Home Improvement Center Inc. v. Georgia-Pacific Corp., 34 B.R. 737 (D.C.N. D.Ill.1983); Farmers & Merchants Bank v. Gibson, 7 B.R. 437 (Bankr.N.D.Fla.1980). As the court in Dupage Lumber, supra at 740, stated: "Exceptions to the common debtor rule have been developed when mandated by equity." See also In re Maddox, 84 B.R. 251 (Bankr.N.D.Ga.1987); In re Coors of North Mississippi, Inc., 66 B.R. 845 (Bankr.N.D.Miss.1986).
Caselaw generally recognizes three exceptions to the common debtor requirement. One exception occurs where a shareholder has treated the corporation as an "alter ego" thus allowing piercing of the corporate veil to hold the stockholder liable for corporate debts. See In re Tampa Chain Co., Inc., 53 B.R. 772 (Bankr.S.D.N. Y.1985). The second exception occurs where a stockholder holds property or a claim against the corporation that equitably should be deemed a contribution to the capital of the corporation. See Farmers & Merchants Bank v. Gibson, 7 B.R. 437 (Bankr.N.D.Fla.1980). A third, but narrower exception arises when the stockholder has engaged in some inequitable conduct. In re Jack Green's Fashions for Men  Big & Tall, Inc., supra.
This third exception is, in essence, the independent equities exception relied upon by Morris. In Jack Green, a bank had a perfected security interest in the business assets of a corporate debtor. It also had the personal guaranty of the controlling shareholders secured by a mortgage on their real estate. The trustee obtained a marshaling order from the court compelling the bank to exhaust its remedies against the guarantors' realty before going after the corporate debtor's assets.
Jack Green holds that the court may marshal the assets of corporate guarantors for the benefit of the creditors of the corporation. Later cases and scholarly treatises have criticized this opinion. See, e.g., Matter of Dealer Support Services Intern., Inc., 73 B.R. 763 (Bankr.E.D.Mich.1987); In re United Medical Research, Inc., 12 B.R. 941 (Bankr.C.D.Cal.1981); Clark, The Law of Secured Transactions, ¶ 4.35 (Supp.1987). This Court cannot discern what independent and separate equities existed in the Jack Green case that persuaded the Eighth Circuit to marshal assets of the individual shareholders (who were acting as sureties for corporate debt) for the benefit of corporate creditors. *162 There was no equity in diluting or completely wiping out any possible distribution to creditors of the individuals for the benefit of unsecured business creditors of the corporation. In re United Medical Research, Inc., id. The facts in the case before this Court, however, are essentially the inverse of the facts in Jack Green. Here, the surety is the debtor and the primary obligee, the Trust, is a semi-independent third party. An examination of the independent equities in the present situation, therefore, must be carried out.
A guarantor normally has no liability to a creditor if there are available assets held by the primary obligee. To the extent that the primary obligee's assets prove insufficient to pay the creditors, it is initially recognized as a matter of state law that the surety is secondarily liable without any need to resort to equitable principles. Trego WaKeeney State Bank v. Maier, 214 Kan. 169, 519 P.2d 743 (1974). However, until such secondary liability ripens to primary liability upon the development of an insufficiency of available assets held by the primary obligee, the guarantor has the right under legal and equitable principles, to require the primary obligee to surrender collateral to satisfy the obligation. Kee v. Lofton, 12 Kan.App.2d 155, 737 P.2d 55 (1987). Under the Bankruptcy Code, the debtor's discharge in this case does not discharge the trust obligation or the mortgage on the trust assets. § 524(e). See also 53 Am.Jur.2d, Marshaling Assets, §§ 11, 23. Thus, ordinarily only when the property of the Trust proves inadequate to satisfy the Bank's claim will the Bank be able to compel the guarantor (the debtor) to satisfy the debt. Kee v. Lofton, supra; Bomud Co. v. Yockey Oil Co., 180 Kan. 109, 299 P.2d 72 (1956); McNall v. Burrow & White, 33 Kan. 495, 6 P. 897 (1885). By guaranteeing the note, debtor never intended nor supposed that he was making his collateral primarily obligated for the debt. See Trego WaKeeney State Bank v. Maier, supra. Because the Bank is assumed to have known that it has taken its encumbrances subject to the inherent equities comprised in a loan guaranty agreement, the Bank has no right, in law or equity, to compel the debtors to satisfy the obligation of the Trust without first exhausting its legal recourse against that Trust which is primarily obligated.
The Court, therefore, will recognize an exception to the common debtor rule. See 53 Am.Jur.2d, Marshaling Assets, § 23 (if one of two joint debtors is primarily liable, marshaling may be enforced for the benefit of the creditors of the one who is only secondarily liable); In re Jack Green's Fashions for Men  Big & Tall, Inc., supra (federal courts of bankruptcy are courts of equity and may apply the doctrine of marshaling where it would be inequitable to allow the senior lienor to exhaust the debtor's assets when such a course would leave the general creditors of the business with nothing). The Trust is the primary obligee of the note. The bankruptcy court is primarily a court of equity, and equity compels the Court to order the Bank to first exhaust the assets of the primary obligee before being allowed to enforce its rights against the debtor, who is secondarily liable on the obligation. The independent and separate equities in this situation, therefore, compel the Court to enforce marshaling for the benefit of the creditors of the debtor who is only secondarily liable on the note.
In the present case the material facts on the marshaling issue are undisputed. Morris' arguments in support of his application of the independent equities exception to the common debtor requirement are sufficient to justify the application of marshaling in this situation. As a matter of law, therefore, Morris is entitled to partial summary judgment on this issue. As stated in the response filed by the Trust, resolution of the marshaling issue will resolve the turnover issue. Accordingly, the Bank's and the Trust's motion for partial summary judgment on the turnover of runs and the marshaling issues are denied. The Court further orders that the remaining issues in this matter, the invalid trust issue, the preference issue; and the fraudulent transfer issue proceed to trial before this Court.
The foregoing constitutes findings of fact and conclusions of law as required by *163 Fed.R.Civ.P. 52(a) and Fed.R.Bankr.P. 7052. A separate judgment will be entered giving effect to the determinations reached herein.
NOTES
[1]  Although the Trust stipulated to the fact that it borrowed the funds, the Trust contends that the bulk of the loan went to Jack Muir as a beneficiary and thus, equity should compel this Court to consider him primarily obligated. Despite the fact that this argument makes the Trust appear illusory, the Court must accept the facts as stipulated: the Trust borrowed the money, the Trust signed the promissory note.
[2]  In this adversary inter alia, Morris challenges the Bank's right to debtors' oil and gas run proceeds which were transferred to the Bank from the debtors within one year prior to the commencement of this case. Morris contends that as successor to all property interests owned by the debtors, he is entitled to any run proceeds received by the Bank before or after the commencement of this case provided by § 547(b). Further, Morris challenges the debtors' transfer of their interest in certain oil and gas properties to the Bank under § 550(a)(1). Morris also challenges the legal validity of debtor's unrestricted power of disposition granted to him as the trustee of the Trust. Lastly, Morris asks the Court to grant the equitable relief of marshaling assets because one of debtors' creditors is capable of seeking recourse for its obligation from a fund which Morris is unable to reach, the fund held by the Trust. The Bank and debtor (in his capacity as Trustee of the Trust) contend inter alia, that Morris has not alleged his claim with particularity. As marshaling appears to determine the outcome, the other contentions are not reached.
[3]  The debtor has stated that resolution of the marshaling issue will resolve the turnover issue raised by Morris. Accordingly, the Court will not address the turnover of oil and gas runs or the invalid trust issues raised by Morris. These issues will not affect the outcome of this case.
