
692 N.E.2d 865 (1998)
295 Ill. App.3d 336
229 Ill.Dec. 876
MEMBERS EQUITY CREDIT UNION, Plaintiff,
v.
Kevin DUEFEL and Cathy Duefel, Defendants-Appellants (Bill Martinson, Petitioner-Appellee).
No. 3-96-1051.
Appellate Court of Illinois, Third District.
March 26, 1998.
*866 Patrick Hartnett (argued), Chicago, for Cathy Duefel and Kevin Duefel.
Gary L. Corlew (argued), Crest Hill, for Members Equity Credit Union.
Justice HOMER delivered the opinion of the court:
Members Equity Credit Union foreclosed on the junior mortgage it held on the residential property of Kevin and Cathy Duefel. At the time the judicial sale was confirmed, the trial court granted a motion filed by the successful bidder, Bill Martinson, requesting that the surplus from the judicial sale be distributed to him. Subsequently, the trial court modified the order of distribution to require Martinson to use the surplus to pay the first mortgage on the property which had not been adjudicated in this action. The Duefels appeal. Following our careful review, we reverse.

FACTS
Members Equity Credit Union commenced this action by filing a complaint to foreclose the junior mortgage it held on the Duefels' residence. The judgment of foreclosure provided that any surplus should be remitted "to the mortgagor or as otherwise directed by the court." The property was also subject to a first mortgage held by First Chicago, although the first mortgage was not identified in the complaint or judgment of foreclosure.
Martinson purchased the subject real estate at the judicial sale, having submitted the successful bid of $58,000.00. After payment of the junior mortgage and court costs, there remained a surplus of $21,396.82. The trial court granted a motion filed by Martinson awarding him the surplus. According to an exhibit attached to Martinson's motion, the first mortgage held by First Chicago had a *867 balance of approximately $28,000.00. Subsequently, the Duefels moved to vacate the order and asked the trial court to award the surplus to them. After a hearing, the trial court ordered Martinson to apply the surplus to the first mortgage indebtedness. The Duefels then filed this appeal.

ANALYSIS
The sole issue on appeal is whether the trial court erred in ordering that the surplus resulting from the foreclosure of the junior mortgage be applied to payment of the first mortgage. A trial court's order of distribution of the surplus from a judicial foreclosure sale will not be disturbed on appeal absent a showing of an abuse of discretion. See Kankakee Federal Savings & Loan Ass'n v. Mueller, 134 Ill.App.3d 943, 89 Ill.Dec. 781, 481 N.E.2d 332 (1985); Grubert v. Cosmopolitan National Bank of Chicago, 269 Ill. App.3d 408, 206 Ill.Dec. 555, 645 N.E.2d 560 (1995).
Section 15-1512 of the Mortgage Foreclosure Act provides:
"The proceeds resulting from the sale of real estate under this Article shall be applied in the following order:
(a) the reasonable expenses of sale;
(b) the reasonable expenses of securing possession before sale * * *;
(c) if the sale was pursuant to judicial foreclosure, satisfaction of claims in the order of priority adjudicated in the judgment of foreclosure or order confirming sale; and
(d) remittance of any surplus to be held by the person appointed by the court to conduct the sale until further order of the court. If there is a surplus, such person conducting the sale shall send written notice to all parties to the proceeding advising them of the amount of the surplus, and that the surplus shall be held until a party obtains a court order for its distribution or until, in the absence of an order, the surplus is forfeited to the State." (Emphasis added.) 735 ILCS 5/15-1512 (West 1994).
The foreclosure judgment in the instant case contained virtually the same language as the statute with respect to payment of expenses and satisfaction of claims. However, the judgment provided that any surplus was to be remitted "to the mortgagor or as otherwise directed by the court." (Emphasis added.)[1]
The Duefels argue that the trial court should not have allowed Martinson, the successful bidder, to recoup his own funds for the purpose of paying a superior lien which remained on the property. They point out that Martinson had notice, either actual or constructive, of the prior lien when he purchased the property. Further, the Duefels argue that because the first mortgage was not adjudicated in this foreclosure action, the court had no authority to order the surplus funds be applied to its repayment.
In response, Martinson argues that because the statute contains no legislative preference for the distribution of the surplus, the trial court's decision to award the funds to him was a proper exercise of its discretion. He asserts that it would be inequitable for the surplus funds to be awarded to the Duefels, because prior to the foreclosure they had no equity in the property and awarding the proceeds to them would result in an unjust windfall.
The parties have not cited, and we have not found, any authority determining who is entitled to surplus funds resulting from a junior mortgage foreclosure sale. Therefore, we consider this issue a matter of first impression in Illinois. For the reasons that follow, we hold that the trial court abused its discretion when it ordered that the surplus be applied to the repayment of the first mortgage.
Illinois law mandates that a buyer at a judicial foreclosure sale takes the property *868 subject to any outstanding debts which may encumber the property subsequent to the sale. Heritage Federal Credit Union v. Giampa, 251 Ill.App.3d 237, 239, 190 Ill.Dec. 638, 639, 622 N.E.2d 48, 49 (1993). Therefore, Martinson clearly purchased the property subject to the outstanding first mortgage held by First Chicago. Martinson points out that the first mortgage was not identified in the complaint, judgment, or notice of sale. However, we will not consider whether Martinson had actual notice of the first mortgage because:
"All deeds, mortgages and other instruments of writing which are authorized to be recorded, shall take effect and be in force from and after the time of filing the same for record, and not before, as to all creditors and subsequent purchases, without notice * * *." (Emphasis added). 765 ILCS 5/30 (West 1994). It is not disputed that the first mortgage was of record at the time of the judicial sale, and Martinson, as a subsequent purchaser, is deemed to have had notice of its existence.
Furthermore, a foreclosure sale must proceed on the assumption that bidding will be competitive. Community Savings & Loan Ass'n v. Cosmopolitan National Bank of Chicago, 72 Ill.App.2d 202, 209, 219 N.E.2d 103, 107 (1966). Competitive bidding at a foreclosure sale promotes the public policy goal of maximizing the selling price, which in turn, lessens the chance that there will be insufficient proceeds to pay the judgment creditors or that a deficiency judgment will be taken against the mortgagors. The trial court's decision rendered in the instant case substantially undermines that goal.
Martinson presumably bid an amount he believed the property to be worth despite the existence of the first mortgage. If the trial court's order is allowed to stand, the competitive bidding process utilized in this case would be rendered practically meaningless. In effect, Martinson would have purchased this property for the amount of the foreclosed mortgage plus costs regardless of the actual amount of his bid. Based upon the trial court's decision, a bidder would have every incentive to bid an excessive amount at a judicial sale because he, as the highest bidder, would be able to petition the court to recoup the surplus. Following this reasoning, the sheriff could have simply announced that the first person to appear at the sale with funds equalling the amount of the foreclosed mortgage would prevail.
Under the circumstances, we believe that principles of equity dictate that the Duefels should have been awarded the surplus funds. See 735 ILCS 5/15-1106(e) (West 1994) (providing that "[g]eneral principles of law and equity, * * *, supplement this Article unless displaced by a particular provision of it").
Martinson points out that even after the judicial sale, the Duefels remained liable for the full amount of the first mortgage based upon the promissory note secured by the mortgage. Therefore, the Duefels received a direct benefit when the trial court ordered the surplus applied to the payment of their first mortgage obligation. However, just as the Duefels would have been personally responsible for any deficiency resulting from this judicial sale, they should be entitled to any surplus. See Central Republic Bank & Trust Co. v. Bent, 281 Ill.App. 365 (1935).
We recognize that the trial court was attempting to complete the transaction between the Duefels and First Chicago in an effort to clear the property of the prior encumbrance and to satisfy the Duefels' remaining obligations to First Chicago. However, we find that the trial court abused its discretion by interfering with that contractual relationship. The record contains little information about the terms and status of the First Chicago mortgage. Since First Chicago was not a party to this action, its interest was not affected by the foreclosure proceedings because it held a superior lien on the property. Therefore, First Chicago remained in a position following the judicial sale to protect its interest, by initiating collection proceedings against the Duefels, or foreclosure proceedings against the real estate, if the loan was in default. See generally Heritage Federal Credit Union, 251 Ill. App.3d at 239, 190 Ill.Dec. at 638-39, 622 N.E.2d at 49-50. We refuse to speculate as to the status of the first mortgage or to make a determination that First Chicago and the Duefels wanted to accelerate the remaining *869 payments under that instrument and underlying note.
We distinguish our prior holding in Kankakee Federal Savings & Loan Ass'n v. Mueller, 134 Ill.App.3d 943, 89 Ill.Dec. 781, 481 N.E.2d 332 (1985). In Mueller, we affirmed a trial court's decision to distribute the surplus to the successful bidder at the judicial sale. However, that case involved the foreclosure of a first mortgage, and the party which received the surplus was not only the successful bidder at the judicial sale, but was also a named defendant as holder of a junior mortgage on the property. The successful bidder in the instant case was neither a party to the foreclosure nor had any interest in the property prior to the judicial sale.
Martinson also argues that this court should consider his detrimental reliance on the trial court's original order awarding him the surplus because he incurred expenses at that time for improvements and repairs to the property. However, the Duefels filed a timely motion to vacate that order and have sought this court's review of the modified order in accordance with the procedures proscribed by Illinois Supreme Court Rules. Martinson will not now be heard to argue that the trial court's order is beyond review due to the fact that he may have incurred expenses on the property prior to final adjudication of the trial court's initial order.
We hold that the trial court abused its discretion in ordering that the surplus funds from the judicial sale be applied to the payment of the first mortgage on the property. The surplus funds should have been awarded to the Duefels, as the foreclosed mortgagors.

CONCLUSION
For the foregoing reasons, the judgment of the circuit court of Will County is reversed and the case is remanded for further proceedings consistent with this opinion.
Reversed and remanded.
BRESLIN, J., concurs.
Justice HOLDRIDGE, dissenting:
I respectfully dissent. I would hold that the trial court did not abuse its discretion in ordering Martinson to apply the surplus to the first mortgage indebtedness. Where discretion has been vested in the trial court, only a clear abuse of that discretion or the application of impermissible legal criteria justifies reversal. Boatmen's National Bank v. Martin, 155 Ill.2d 305, 185 Ill.Dec. 509, 614 N.E.2d 1194 (1995). Abuse of discretion occurs only when no reasonable person could find as the trial court did. McKenzie Dredging Co. v. Deneen River Co., 249 Ill.App.3d 694, 188 Ill.Dec. 824, 619 N.E.2d 188 (1993).
I cannot agree with the majority's conclusion that no reasonable person could find as the trial court did in awarding the surplusage to the senior lienholder, even though that lienholder had not been made a party to the foreclosure proceeding. In Kankakee Federal Savings and Loan Association v. Mueller, 134 Ill.App.3d 943, 89 Ill.Dec. 781, 481 N.E.2d 332 (1985), this court held that it was not an abuse of discretion for the trial court to award the surplus proceeds of a foreclosure sale to a junior lienholder. Although, as the majority points out, the junior lienholder had been named as a party defendant, it had not entered an appearance and was therefore in default. In spite of its failure to appear in the proceeding, the trial court nonetheless awarded it the surplus proceeds. The mortgagor maintained on appeal that the trial court had abused its discretion in awarding the surplus to a party that had failed to appear and protect its rights in the property. This court affirmed the decision of the trial court, reasoning that the distribution of surplus proceeds of a mortgage foreclosure is a matter in equity and the trial court, in its discretion, may distribute the surplus to any party shown to have an interest in the property.
In the instant matter, the majority makes a strong case for awarding the surplus to the mortgagors. However, it is well-settled that under the abuse of discretion standard, the role of the reviewing court is not to substitute its judgment for that of the trial court or even to determine whether the trial court acted wisely. Schoon v. Hill, 207 Ill.App.3d 601, 152 Ill.Dec. 841, 566 N.E.2d 718 (1990). *870 Rather the reviewing court must limit its task to determining whether the trial court's decision is one with which no reasonable person could agree.
The record here indicates that there was no dispute that Members Equity had a lienhold interest in the property subject to the foreclose action. As between Members Equity and the Duefels, a reasonable person could conclude that equity would favor paying the excess proceeds to the lienholder with an interest in the property rather than to the mortgagors whose interest had been extinguished in the foreclosure.
I would therefore affirm the ruling of the trial court and I dissent on that basis.
NOTES
[1]  The language of the foreclosure judgment reflects a prior version of section 15-1512(d) of the Mortgage Foreclosure Act which was amended to its current form by Public Act 86-974, effective July 1, 1990. Previously, section (d) provided: "remittance of any surplus to the mortgagor or as otherwise directed by the court." 735 ILCS 5/15-1512, Historical & Statutory Notes, at 639 (Smith-Hurd 1992).
