
656 N.E.2d 142 (1995)
275 Ill.App.3d 792
211 Ill.Dec. 950
F.H. PRINCE & CO., INC., a corporation, Plaintiff-Appellee,
v.
TOWERS FINANCIAL CORPORATION, a corporation, Defendant-Appellant.
No. 1-94-4307.
Appellate Court of Illinois, First District, Fifth Division.
September 29, 1995.
*144 Roger B. Harris, Daniel J. Becka, Altheimer & Gray, Chicago, for Appellant.
Stephen C. Schulte, Paul P. Biebel, Jr., Christopher S. Canning, Winston & Strawn, Chicago, for Appellee.
Justice GORDON delivered the opinion of the court:
This appeal follows our dismissals of appellant's two prior appeals which had been taken from nonfinal judgments. (F.H. Prince & Co. v. Towers Financial Corp. (1994), 266 Ill.App.3d 977, 203 Ill.Dec. 940, 640 N.E.2d 1313.) Appellant subsequently obtained certification pursuant to Supreme Court Rule 304(a) (134 Ill.2d R. 304(a)); and this court now has jurisdiction to hear the merits of the arguments presented. The underlying action brought by F.H. Prince & Co. (Prince) alleged a breach of contract by Towers Financial Corporation (Towers) due to Towers' failure to fulfill the terms of a settlement agreement, promissory note and guaranty. In defense of that action, Towers filed two affirmative defenses: (1) that the settlement instruments were voidable because they were executed by Towers as a result of the fraudulent misrepresentations of a third party and because Prince gave no value for their execution; and (2) that the settlement instruments were unenforceable for want of consideration. Towers also filed a counterclaim seeking restitution based on mistake of fact and unjust enrichment.
The trial court struck Towers' first affirmative defense and counterclaim with the right to refile and dismissed with prejudice Towers' counterclaim with the right to refile and dismissed with prejudice Towers' second affirmative defense. Towers thereafter filed an amended affirmative defense and amended counterclaim, and Prince moved to dismiss those pleadings. On the day of hearing, Towers sought leave to file a second amended verified affirmative defense and counterclaim and attached that document to its motion. The counterclaim therein sought declaratory judgment that the settlement instruments were unenforceable due to material misrepresentations (count I); restitution based on fraudulent misrepresentations and unjust enrichment (count II); declaratory judgment that the settlement instruments were unenforceable due to mutual mistake of fact (count III); and restitution based on mutual mistake of fact and unjust enrichment (count IV). The trial court granted Prince's motion to dismiss Towers' amended affirmative defense and amended counterclaim and denied Towers' motion to file its second amended verified affirmative defense and counterclaim. The court held, inter alia, that, on the basis of the facts alleged, Prince had given value and therefore the settlement *145 instruments were not void. In upholding its dismissal of Towers' affirmative defense, the court also noted that the alleged fraudulent misrepresentations by the third party were directed at an underlying transaction to which the settlement agreement between Towers and Prince was merely ancillary. After Towers' motion to reconsider was denied, the case proceeded to jury trial.
At trial, the court directed a verdict on the amount of principal due Prince under the promissory note and guaranty and denied Towers' request to have the jury determine the issue of attorneys' fees and costs due under those instruments. After the jury returned a verdict on the interest portion of damages, judgment was entered in the amount of $767,986.86 representing $600,000 in principal and $167,986.86 in interest. Two additional judgments were entered against Towers in the amounts of $60,967.39 and $18,519.56 representing attorneys' fees and costs incurred through May 8, 1991, the date Towers' post-trial motion was denied.
On appeal, Towers argues that the trial court erred in dismissing its amended affirmative defense and counterclaim and, alternatively, in denying its motion for leave to file its second amended affirmative defense and counterclaim. Specifically, Towers argues that both pleadings set forth sufficient allegations of unjust enrichment and voidability based upon fraudulent misrepresentation and lack of consideration. Towers also argues that the trial court erred in refusing to permit the jury to determine the issue of attorneys' fees and costs due under the settlement agreement, promissory note and guaranty.
The settlement agreement, promissory note and guaranty at issue were signed on March 30, 1988. In accordance with those documents, Towers guarantied all payments owed by United Fire Insurance Company (United Fire), a Towers' subsidiary, to F.H. Prince & Co. (Prince) in settlement of Prince's 1979 lawsuit pending against United Fire. Prince's claim against United Fire, in which it was seeking $1.6 million, had been settled for $1.2 million; $600,000 to be paid in six installments pursuant to the settlement agreement and $600,000 plus interest to be paid quarterly pursuant to the promissory note. In accordance with the settlement agreement, United Fire paid Prince three installments totalling $350,000; and Towers, as the guarantor, paid the remaining $250,000. Towers subsequently notified Prince that it would not make any payments due under the promissory note, and Prince instituted the instant breach of contract action.
In support of its affirmative defenses and counterclaim, Towers alleged that it acquired United Fire in October of 1987 when it purchased United Fire's parent corporation. Towers alleged that it was induced to enter into this purchase agreement by reason of "false and misleading" material misrepresentations and omissions concerning United Fire's financial condition made by a third party, Ernest N. Solomon, who was chairman and principal shareholder of United Fire's parent corporation. Towers further alleged that in order to consummate the acquisition of United Fire, which had been placed in conservatorship by the Illinois Department of Insurance in May of 1987, it was required by that Department to "strengthen United Fire's financial condition by, inter alia, infusing additional capital into United Fire and by assuming legal responsibility for the disposition of certain of United Fire's liabilities" including Prince's claim against United Fire. Towers alleged that United Fire was removed from conservatorship on October 26, 1987. Towers further alleged that, at the time of acquisition, United Fire was insolvent but that Towers was unaware of that fact due to the misrepresentations by and omissions of Solomon. Towers became aware of that insolvency on March 3, 1989 when the "Department of Insurance caused an Order of Liquidation with a Finding of Insolvency to be entered against United Fire."
With respect to Towers' settlement of the Prince litigation, Towers alleged that prior to Towers' assumption of responsibility for the Prince debt, Prince would have been unable to collect its claim from United Fire because United Fire was in conservatorship and that, therefore, Prince neither gave value nor materially changed its position when it settled its claim against United Fire. Towers further alleged that Prince directly benefited *146 from Solomon's fraud in that it received $600,000 from Towers pursuant to the settlement agreement; $250,000 that Towers paid directly to Prince and $350,000 that it paid indirectly through its infusion of $3.8 million capital into United Fire.
Based on the allegations discussed above, Towers' affirmative defense concluded that:
"The Settlement Agreement, Promissory Note, and Guaranty * * * are voidable transactions under law as to Towers because said contractual agreements were entered into, and executed, by Towers solely as a condition of its acquisition of * * * the parent of United Fire. Because said acquisition was procured through fraudulent misrepresentations and omissions * * * the acquisition transaction and all other ancillary transactions are voidable contracts."
Towers' counterclaim for restitution concluded that, due to the fraud perpetrated by Solomon, the guaranty was a voidable contract and resulted in the unjust enrichment of Prince in the amount of $600,000.
As is relevant to the issues raised in the instant appeal, Towers' second amended verified affirmative defense and counterclaim differed from its prior pleading, discussed in detail above, in that the latter contained several modified allegations. Towers alleged that the "Department [of Insurance] required Towers to assume responsibility for and to resolve the Prince [law]suit without depleting any assets of United Fire." The pleading averred that Towers determined that "the least burdensome means" to satisfy the Department's condition was through settlement of the Prince lawsuit. Towers also alleged that Prince, in entering into the settlement agreement, did not materially change its position or give value even though it dismissed its suit against United Fire with prejudice since "albeit unknown to Towers and Prince in March of 1988, United Fire was totally insolvent, and Prince's cause of action against United Fire was totally worthless" because United Fire's liabilities on claims senior and prior to Prince's (claims by policyholders, beneficiaries, insureds and liability claims against insureds of United Fire) far exceeded United Fire's assets.
A motion to dismiss brought pursuant to section 2-615 of the Code of Civil Procedure (735 ILCS 5/2-615 (West 1994) formerly Ill.Rev.Stat.1991, ch. 110, par. 2-615) is used to attack defects in a pleading. (E.g., Duhl v. Nash Realty, Inc. (1981), 102 Ill.App.3d 483, 57 Ill.Dec. 904, 429 N.E.2d 1267.) When ruling on a motion to dismiss, all well-pleaded facts in the pleading are admitted and taken as true. (E.g., Michael Reese Hospital & Medical Center v. Chicago HMO Ltd. (1990), 196 Ill.App.3d 832, 143 Ill.Dec. 537, 554 N.E.2d 472.) When a claim or defense is founded upon a written instrument, that instrument must be attached to the pleading as an exhibit; and that exhibit constitutes a part of the pleading for purposes of a motion to dismiss. (See Payne v. Mill Race Inn (1987), 152 Ill.App.3d 269, 105 Ill.Dec. 324, 504 N.E.2d 193; see also 735 ILCS 5/2-606 (West 1994) formerly Ill.Rev.Stat.1991, ch. 110, par. 2-606.) Where inconsistent, the exhibit controls over the factual allegations in the pleading. (Charles Hester Enterprises, Inc. v. Illinois Founders Insurance Co. (1986), 114 Ill.2d 278, 102 Ill.Dec. 306, 499 N.E.2d 1319; see People ex rel. Hartigan v. E & E Hauling, Inc. (1992), 153 Ill.2d 473, 180 Ill.Dec. 271, 607 N.E.2d 165.) A claim should not be dismissed on the pleadings unless it clearly appears that no set of facts can be proved under the pleadings which will entitle a party to recover. E.g., Zadrozny v. City Colleges of Chicago (1991), 220 Ill.App.3d 290, 163 Ill.Dec. 93, 581 N.E.2d 44.
Based upon the above-stated allegations, Towers argues on appeal that it set forth sufficient allegations to support its affirmative defense that the settlement agreement, promissory note and guaranty were voidable. This theory is premised on subsection (2) of section 164 of the Restatement (Second) of Contracts (hereinafter referred to as the Restatement). Section 164, captioned "When a Misrepresentation Makes a Contract Voidable," provides in pertinent part:
"(2) If a party's manifestation of assent is induced by either a fraudulent or a material misrepresentation by one who is not a party to the transaction upon which the recipient is justified in relying, the contract *147 is voidable by the recipient, unless the other party to the transaction in good faith and without reason to know of the misrepresentation either gives value or relies materially on the transaction." (Restatement (Second) of Contracts § 164(2), at 445 (1981).)
Towers argues that its affirmative defense satisfied the requirements of this section of the Restatement because it contained allegations that a material misrepresentation was made by a third party (Solomon); that Towers was justified in relying on the misrepresentation; that the misrepresentation induced Towers to enter into the settlement agreement and guaranty; and that, although Prince acted in good faith and did not have reason to know of the misrepresentation, Prince did not give value or materially rely on the settlement transaction.
As noted in Comment e of section 164 of the Restatement, "the term `value' has the same meaning here as it does under Uniform Commercial Code § 1-201(44)." (Restatement (Second) of Contracts § 164, Comment e, at 447 (1981).) Section 1-201(44) of the Uniform Commercial Code states that a person gives "value" for rights if he acquires them "generally, in return for any consideration sufficient to support a simple contract." (Ill.Rev.Stat.1989, ch. 26, par. 1-204(44) now at 810 ILCS 5/1-204(44) (West 1994).) Valuable consideration for a contract consists of some right, interest, profit or benefit accruing to one party, including a third party (State Bank of Geneva v. Sorenson (1988), 167 Ill.App.3d 674, 118 Ill.Dec. 305, 521 N.E.2d 587), or some forbearance, detriment, loss or responsibility given, suffered or undertaken by the other. (E.g., De Fontaine v. Passalino (1991), 222 Ill.App.3d 1018, 165 Ill.Dec. 499, 584 N.E.2d 933; see Steinberg v. Chicago Medical School (1977), 69 Ill.2d 320, 13 Ill.Dec. 699, 371 N.E.2d 634.) The legal concepts of benefit and detriment were explained in Hamilton Bancshares, Inc. v. Leroy (1985), 131 Ill.App.3d 907, 87 Ill.Dec. 86, 476 N.E.2d 788 as follows:
"`Both benefit and detriment have a technical meaning. Neither the benefit to the promisor nor the detriment to the promisee need be actual. "It would be a detriment to the promisee, in a legal sense, if he, at the request of the promisor and upon the strength of that promise, had performed any act which occasioned him the slightest trouble or inconvenience, and which he was not obliged to perform." Thus abstaining from smoking and drinking, though in fact in the particular case a benefit to the promisee's health, finances, and morals and of no benefit to the promisor, is a legal detriment and if requested as such is sufficient consideration for a promise. So obtaining signatures to a petition is a sufficient consideration though the petition is so defective as to be useless and the signatures are, therefore, of no benefit to the promisor. Detriment, therefore, as used in testing the sufficiency of consideration means legal detriment as distinguished from detriment in fact. It means giving up something which immediately prior thereto the promisee was privileged to retain, or doing or refraining from doing something which he was then privileged not to do, or not to refrain from doing.
Benefit correspondingly must mean the receiving as the exchange for his promise of some performance or forbearance which the promisor was not previously entitled to receive. That the promisor desired it for his own advantage and had no previous right to it is enough to show that it was beneficial.'
* * * It is not essential that [consideration] import a certain gain or loss to either party, but is sufficient if the party in whose favor the contract is made parts with a right which it might otherwise exert. [Citation.]" Hamilton Bancshares, Inc., 131 Ill.App.3d at 913, 87 Ill.Dec. at 90, 476 N.E.2d at 792 quoting 1 Williston, Contracts § 102A at 380-82 (3d ed.1957).
In accordance with these principles, it has been held that the compromise of a disputed claim will serve as consideration as will a promise to forego legal action (Redarowicz v. Ohlendorf (1981), 95 Ill.App.3d 444, 50 Ill. Dec. 892, 420 N.E.2d 209, aff'd in part, rev'd in part on other grounds (1982), 92 Ill.2d 171, 65 Ill.Dec. 411, 441 N.E.2d 324). Keller *148 v. State Farm Insurance Co. (1989), 180 Ill. App.3d 539, 129 Ill.Dec. 510, 536 N.E.2d 194.
The allegations in the instant case admit that, at the time the settlement documents were signed, Prince had pending a legally enforceable claim against United Fire. Prince agreed to forego its right to pursue its action against United Fire and compromised that alleged $1.6 million claim for $1.2 million. (See Redarowicz v. Ohlendorf.) Towers alleged in its affirmative defense and argues on appeal, however, that Prince did not give value because it gave up a claim that was uncollectible due to the fact that United Fire was insolvent. We disagree.
The compromise of a disputed claim will provide consideration for the settlement agreement, even if the claim is shown to be invalid, as long as it is asserted in good faith. (Harrell v. Nash (1942), 192 Okla. 95, 133 P.2d 748; Fenner v. Sparks (1934), 170 Okla. 556, 39 P.2d 27 (if the claim be honestly asserted, the surrender thereof is good consideration for a settlement and compromise thereof although it may subsequently develop that the claim was unfounded).) See generally 15A C.J.S. Compromise & Settlement § 11, at 209 (1967) (reality of claim is measured by the state of knowledge of the parties at the time the settlement agreement is executed). See Arlington Park Racetrack, Ltd. v. SRM Computers, Inc. (E.D.N.Y. 1987), 674 F.Supp. 986, 993 ("the release of [an] uncollectible debt * * * may constitute consideration sufficient to support a simple contract * * * thus constituting `value' as the term is used in Section 164(2) of the Restatement (Second) of Contracts"). See also LeMaster v. Amsted Industries, Inc. (1982), 110 Ill.App.3d 729, 66 Ill.Dec. 454, 442 N.E.2d 1367, overruled on other grounds Wilson v. Hoffman Group, Inc. (1989), 131 Ill.2d 308, 137 Ill.Dec. 579, 546 N.E.2d 524. In LeMaster v. Amsted Industries, Inc., the defendant argued that the settlement agreement between the plaintiff and his employer was not made in good faith and was not supported by consideration because the bargain was illusory in that the plaintiff relinquished nothing. (The defendant's third-party contribution action against the employer had been dismissed because the settlement agreement released the employer from all liability.) Citing Stoner v. Stoner (1953), 351 Ill.App. 304, 115 N.E.2d 103, the court recognized the general rule that the compromise of a disputed claim will provide consideration even where the claim is shown not to have been valid as long as it is asserted in good faith. The court further stated:
"Although a disputed claim need not have been a valid one, if a claim is `entirely without foundation,' the claimant will be deemed not to have acted in good faith in asserting or relinquishing it, on the theory that the claimant knew or should have known that the claim could not have been enforced under any state of proof. [Citations.]" LeMaster, 110 Ill.App.3d at 735, 66 Ill.Dec. at 460, 442 N.E.2d at 1372.
Finding that the plaintiff knew or should have known that he "had no rights outside of the Workers' Compensation Act which he could relinquish in return for the [employer's] lien waiver and the cash payment" (110 Ill.App.3d at 736, 66 Ill.Dec. at 461, 442 N.E.2d at 1373), the court concluded that the settlement agreement between the plaintiff and his employer did not constitute a good faith settlement supported by consideration. LeMaster has since been overruled, not on the basis of the general rule with respect to good faith settlements but with respect to its finding of no good faith settlement under the facts therein. (Wilson v. Hoffman Group, Inc.) Subsequent cases have held that a settlement agreement between an employee and an employer, releasing the employer from all tort liability could be made in good faith and is supported by consideration because the employer is liable in tort to the employee until the defense of exclusivity under the Workers' Compensation Act is raised. (Wilson v. Hoffman Group, Inc.; Dixon v. Northwestern Publishing Co. (1988), 166 Ill.App.3d 745, 117 Ill.Dec. 581, 520 N.E.2d 932; see also Ballweg v. City of Springfield (1986), 114 Ill.2d 107, 102 Ill.Dec. 360, 499 N.E.2d 1373 (plaintiff's release of joint tortfeasor where plaintiff's cause of action could have been barred by statute of limitations constituted good faith settlement).) In these cases, the settlement agreements were upheld even though entitlement to tort recovery against the employers *149 would disappear upon the employers' assertions of the exclusivity defense. The decisive issue was whether the parties were acting in good faith at the time the settlements were entered into.
Following these general principles leads to the conclusion that, in the instant case, Prince's compromise of its claim, which according to the complaint was uncollectible but which was asserted in good faith, constituted sufficient consideration for Towers' guaranty. Towers does not allege or indicate in any way that Prince was aware or should have been aware of United Fire's insolvency or of the uncollectibility of its claim against United Fire at the time that claim was compromised nor does Towers allege or argue that the settlement agreement was made in bad faith.
It is knowledge of the claim's unenforceability or uncollectibility at the time the guaranty was executed that also distinguishes the instant action from State ex rel. Ludwick v. Bryant (1985), 237 Kan. 47, 697 P.2d 858 and Bradstreet v. Crosbie (1926), 123 Okla. 269, 253 P. 63, two cases cited by Towers. In those cases, the courts recognized the general principle that forbearance from suit can be legal detriment and sufficient consideration to support a guaranty unless the claim threatened to be enforced is invalid, worthless or unfounded. Applying this principle to the facts, the courts concluded, however, that legal detriment was absent because the debts that were guaranteed, although valid, were worthless. Prior to the execution of the guaranties, the debtors had defaulted on their obligations and had either ceased operations or become insolvent and destitute of assets. The parties to the guaranties knew of the unenforceability or uncollectibility of the debts at the time they entered into the guarantee agreements. Here, however, it is alleged that at the time the settlement agreement was entered into, neither Prince nor Towers had knowledge of United Fire's insolvency. (See Russell v. Jim Russell Supply, Inc. (1990), 200 Ill.App.3d 855, 146 Ill.Dec. 152, 558 N.E.2d 115 (consideration determined as of time of entering into contract).) According to Towers' allegations, United Fire was a viable insurance company and had been removed from conservatorship by petition of the Illinois Department of Insurance five months prior to the consummation of the settlement agreement. See Ill.Rev.Stat.1989, ch. 73, par. 804(5) now 215 ILCS 5/192(5) (West 1994) (Director of Insurance can petition for rehabilitation of domestic insurance company to permit operations to resume where insolvency has been eliminated).
State ex rel. Ludwick v. Bryant is further distinguishable because in that case the court concluded that consideration also was lacking because no benefits had been received by the guarantor or debtor. Here, however, the allegations show that benefits were realized by Towers, the guarantor, and by United Fire, the debtor. Towers desired settlement and had no previous right to it. (See Hamilton Bancshares, Inc. v. Leroy.) By settling the Prince claim, Towers was able to satisfy the commitment it made to the Illinois Department of Insurance to "assum[e] legal responsibility for the disposition of certain of United Fire's liabilities" in return for the Department's agreement to seek removal of United Fire from conservatorship. Towers' own allegations state that it sought the settlement and dismissal of the Prince claim based on a determination that that course of action was "the least burdensome means" to satisfy the Department's condition. Settlement of the Prince litigation also relieved Towers and United Fire of the need to continue to defend against that claim and to incur additional defense costs related thereto. The fact that Towers' acquisition of United Fire ultimately proved to be a catastrophic investment does not erase the immediate benefit to Towers at the time it entered into the settlement with Prince.
Towers' reliance on Arlington Park Racetrack, Ltd. v. SRM Computers, Inc. also is misplaced. There, the plaintiffs (hereinafter referred to as Arlington) brought an action to rescind an agreement wherein they assumed the lease and any outstanding indebtedness owed by the lessee, defendant SRM Computers, Inc. (SRM), to the lessor, defendant RCA American Communications, Inc. (RCA). Arlington alleged that at the time it entered into the assignment and assumption *150 agreement, or novation, SRM fraudulently represented to it that no liabilities existed under its lease with RCA when in fact SRM actually owed RCA arrearages totalling more than $500,000 that had accumulated over the several months preceding the assumption agreement.
Arlington sought rescission based on section 164(2) of the Restatement. RCA argued against the rescission contending that it was an innocent party to SRM's fraudulent representation and that it had given value for Arlington's novation agreement by releasing SRM from the lease. In discussing the applicability of section 164(2) of the Restatement, the court concluded that the release of an uncollectible debt could constitute consideration sufficient to support a simple contract and, thus, value for purposes of the Restatement. However, pursuant to the court's analysis, Arlington was not decided on the basis of this provision of the Restatement but, rather, on the basis of general equitable considerations which Towers did not purport to raise in its pleadings or argue on appeal.
Finally, we are mindful of the admitted fact that Solomon's misrepresentations related to the financial condition of United Fire and were made to induce Towers' purchase of United Fire's parent corporation. Towers admits that the misrepresentations were not made to induce Towers to enter into the settlement agreement but argues that the misrepresentations, nonetheless, induced Towers to enter into the settlement agreement and guaranty. Towers has pointed to no case law that expands section 164 of the Restatement (Second) of Contracts to void an agreement incident to or a consequence of an antecedent agreement or acquisition that was induced by a material misrepresentation or fraud. Although, as previously noted, the trial court alluded to this factor in reaching its determination, we are reluctant to predicate our affirmance on that basis particularly since we have not been shown authorities by either party confronting this question.
Towers next contends that the trial court impermissibly decided questions of fact when it determined that Prince had given value and that Solomon's misrepresentations did not induce Towers to enter into the settlement agreement. When ruling on Prince's motion to dismiss Towers' affirmative defense, the trial court had to determine whether Towers alleged the necessary elements for its fraudulent misrepresentation defense. One such element was whether Prince, an allegedly innocent third party to the fraudulent misrepresentations, had given value to Towers for Towers' agreement to guaranty United Fire's obligations to Prince. Once Towers set forth facts alleging what Prince had given in return for the settlement agreement, namely, that Prince had compromised its claim against United Fire, it became incumbent upon the trial judge to determine whether those facts were sufficient in law to constitute value. The sufficiency of the allegations to establish value or consideration to support a simple contract is a question properly decided by the trial court pursuant to a motion to dismiss. See Redarowicz v. Ohlendorf (complaint alleging promise to forego legal action established consideration; dismissal on pleadings improper).
With respect to the issue of inducement, it also is clear that whether a misrepresentation is an inducement is a question of fact. (See Restatement (Second) of Contracts § 162, Comment c, at 446-47 (1981).) Towers contends that the trial court impermissibly made a factual determination that Solomon's misrepresentations, which concerned United Fire's financial condition, induced Towers to enter into the acquisition agreement but not the settlement agreement with Prince. While such an interpretation of the trial court's comments is possible, an alternative interpretation of the trial court's comments is equally plausible. The trial court may have been deciding the legal question of the applicability of the section 164(2) of the Restatement to consequential contracts which are not the direct object of the alleged material misrepresentation or fraud, a question posed earlier in this opinion but not resolved. In any event, the error, if any, would not require reversal of the order dismissing Towers' affirmative defense since that defense would still fail due to Towers' inability to establish the absence of value given by Prince.
*151 Towers next argues on appeal that its amended verified counterclaim and, alternatively, its second amended verified counterclaim, stated a cause of action based on the theory of unjust enrichment such that dismissal was in error. The doctrine of unjust enrichment underlies a number of legal and equitable actions and remedies including the legal action of assumpsit and restitution. (See HPI Health Care Services, Inc. v. Mt. Vernon Hospital, Inc. (1989), 131 Ill.2d 145, 137 Ill.Dec. 19, 545 N.E.2d 672.) The premise of that doctrine is that "[a] person who has been unjustly enriched at the expense of another is required to make restitution to the other." (Restatement of Restitution § 1, at 12 (1937).) To state a cause of action based on a theory of unjust enrichment, a plaintiff must allege that the defendant has unjustly retained a benefit to the plaintiff's detriment, and that defendant's retention of the benefit violates fundamental principles of justice, equity and good conscience. HPI Health Care Services, Inc. v. Mt. Vernon Hospital, Inc.; see People ex rel. Hartigan v. E & E Hauling, Inc.
Since the doctrine of unjust enrichment presents an implied or quasi-contract claim, where there is a specific contract which governs the relationship of the parties, the doctrine has no application. (People ex rel. Hartigan v. E & E Hauling Inc.; La Throp v. Bell Federal Savings & Loan Association (1977), 68 Ill.2d 375, 12 Ill.Dec. 565, 370 N.E.2d 188). The rationale for this rule of law was stated in Industrial Lift Truck Service Corp. v. Mitsubishi International Corp. (1982), 104 Ill.App.3d 357, 361, 60 Ill. Dec. 100, 104, 432 N.E.2d 999, 1002 as follows:
"When parties enter into a contract they assume certain risks with an expectation of a return. Sometimes, their expectations are not realized, but they discover that under the contract they have assumed the risk of having those expectations defeated. As a result, they have no remedy under the contract for restoring their expectations. In desperation, they turn to quasi-contract for recovery. This the law will not allow. Quasi-contract is not a means for shifting a risk one has assumed under contract. [Citation.]"
See also Prodromos v. Poulos (1990), 202 Ill.App.3d 1024, 1032, 148 Ill.Dec. 345, 353, 560 N.E.2d 942, 948 ("This rule holds the contract parties to their agreement and prevents a party who made a bad business decision from asking the court to restore his expectations").
In the instant case, Towers' counterclaim for restitution based on the doctrine of unjust enrichment seeks recovery of monies that it paid directly, and allegedly indirectly, to Prince in accordance with the terms of the settlement agreement and guaranty. While Towers' acceptance of the terms of those instruments may, in hindsight, have been "a bad business decision" (see Prodromos, 202 Ill.App.3d at 1033, 148 Ill.Dec. at 354, 560 N.E.2d at 948), it is those specific contracts that must govern the relationship of the parties and which make the doctrine of unjust enrichment inapplicable. (See People ex rel. Hartigan v. E & E Hauling, Inc.; La Throp v. Bell Federal Savings & Loan Association; Prodromos v. Poulos.) Thus, Towers' counterclaim seeking restitution based on the theory of unjust enrichment was properly dismissed and leave to file counts II and IV of its second amended counterclaim, similarly based on unjust enrichment theories, was properly denied.
Towers' final argument on appeal is that the trial court erred in refusing to permit a jury determination of attorneys' fees and expenses due under the terms of the settlement instruments. Towers filed a jury demand pursuant to section 2-1105 of the Code of Civil Procedure (Ill.Rev.Stat.1989, ch. 110, par. 2-1105 now 735 ILCS 5/2-1105 (West 1994)); and a jury trial was held. The trial court directed a verdict as to Towers' liability for the principal and allowed the jury only to determine the amount of interest due. The court subsequently held hearings on Prince's petitions for fees and costs and entered judgments on those petitions.
As noted in this court's earlier opinion, the settlement agreement, promissory note and guaranty provided that Towers and United Fire would be liable to Prince for the reasonable costs and expenses, including attorneys' *152 fees, incurred by Prince to enforce its rights against them. (See F.H. Prince & Co., 266 Ill.App.3d at 980-81, 203 Ill.Dec. at 942-43, 640 N.E.2d at 1315.) Towers' liability for attorneys' fees and costs was a term of the contract (see Computer Sales Corp. v. Rousonelos Farms, Inc. (1989), 190 Ill.App.3d 388, 137 Ill.Dec. 816, 546 N.E.2d 761) and thus an element of damages in Prince's breach of contract action (see 266 Ill.App.3d at 987-88, 203 Ill.Dec. at 946-47, 640 N.E.2d at 1320).
The issue raised in the instant appeal was discussed and decided in a well-reasoned opinion of the United States District Court for the Northern District of Illinois in A.G. Becker-Kipnis & Co. v. Letterman Commodities, Inc. (N.D.Ill.1982), 553 F.Supp. 118. In that breach of contract case, the plaintiff requested a jury trial but opposed defendant's request to have the jury assess costs and attorneys' fees recoverable under the terms of the contract. The trial court held that the right to a jury trial was available only as to questions of liability and compensatory damages but not as to the determination of costs and attorneys' fees. In so holding, the court recognized the Seventh Amendment right-to-jury analysis set forth in Ross v. Bernhard (1970), 396 U.S. 531, 90 S.Ct. 733, 24 L.Ed.2d 729. The Ross court stated that the right to a jury depended on the nature of the issue to be tried considering, "first, the pre-merger custom with reference to such questions; second, the remedy sought; and third, the practical abilities and limitations of juries." (Ross, 396 U.S. at 538 & n. 10, 90 S.Ct. at 738 & n. 10, 24 L.Ed.2d 729.) Applying these criteria, the court in A.G. Becker-Kipnis & Co. noted that attorneys' fees and costs: (1) were traditionally determined by the court; (2) were not necessarily "legal" relief, even though a form of monetary relief, because they had a restitutionary nature also; and (3) suggested a "`complexity' exception" finding that "requiring the parties to submit evidence on attorneys' fees before the `prevailing party' has been ascertained and before the services have been completed raises substantial practical difficulties" (553 F.Supp. at 124). Lastly, while invoking the "`functional justification' exception" to the Seventh Amendment recognized in Curtis v. Loether (1974), 415 U.S. 189, 94 S.Ct. 1005, 39 L.Ed.2d 260, the Becker-Kipnis court rejected that exception as a basis for denying the right to trial by jury in the case before it. The court concluded finding that the determination of attorneys' fees and costs should be made by the court after the services have been performed.
No Illinois case has directly confronted the specific issue raised here; namely, whether a properly executed jury demand requires a jury determination of the amount of attorneys' fees and costs recoverable as an element of damages when a portion of the fees and costs are prospective in nature. We note that in the case of De Kalb Bank v. Purdy (1990), 205 Ill.App.3d 62, 150 Ill.Dec. 420, 562 N.E.2d 1223 the court did find that the question of attorneys' fees along with other monetary damages should be decided by a jury. However, in that case, the court did not focus on the specific question of attorneys' fees but, rather, concerned itself with the broader question as to whether any claims for monetary damages which included various items of damage for breach of contract are entitled to jury determination in the context of a declaratory judgment action. No attempt was made to discuss any issues special and peculiar to attorneys' fees as opposed to other monetary claims. We also note that the Second and Third Circuits of the United States Courts of Appeals have cursorily indicated, by way of dictum only, without any discussion or analysis, that it was appropriate for a jury to determine damages including attorneys' fees in an action for breach of contract. (Beckwith Machinery Co. v. Travelers Indemnity Co. (3rd Cir. 1987), 815 F.2d 286, 290 n. 7; F.H. Krear & Co. v. Nineteen Named Trustees (2nd Cir. 1985), 776 F.2d 1563, 1564.)[1] In none of *153 these cases did the courts consider the Ross factors or conceptualize the practical abilities and limitations of juries in determining "open-ended" contractual damages.
The same distinction also applies to the per curiam decision of Simler v. Conner (1963), 372 U.S. 221, 83 S.Ct. 609, 9 L.Ed.2d 691 and the case of Ealy v. Peddy (1985), 138 Ill. App.3d 397, 92 Ill.Dec. 939, 485 N.E.2d 1182 cited by Towers. Those cases involved suits by attorneys against their clients for fees. While the U.S. Supreme Court and our state court allowed the issue of attorneys' fees to go to the jury, there were no issues raised as to whether attorneys' fees were proper subjects for jury determination. The court in Ealy only addressed whether the jury demand was sufficient in form and whether it was timely; while the issue addressed in Simler, as in De Kalb Bank, was whether trial by jury was appropriate in declaratory judgment actions.
Even more overridingly, Simler and Ealy are further distinguishable because they involve recovery of finite attorneys' fees which have accrued for services rendered to a client and are not contingent upon the efforts of the attorneys to effect their payment. As noted in Becker-Kipnis, the quantitative analysis involved in the determination of attorneys' fees in those cases is "no different from any other action whose basis was a defendant's refusal to pay for past services" (553 F.Supp. at 123). Here, by contrast, as in Becker-Kipnis, the recovery of fees is not sought from the client for whom the legal services were rendered but from the client's opponent pursuant to a special contractual provision permitting recovery of attorneys' fees and other collection costs.
We are persuaded by the analysis in Becker-Kipnis that such attorneys' fees, as those in Becker-Kipnis and the instant case, are unquantified and "open-ended" and do not fit with those monetary and compensatory claims that would otherwise be subject to the Seventh Amendment right to a jury. A holding requiring a jury determination of attorneys' fees in cases involving "open-ended" fees would necessitate the reconvening of juries on several post-trial occasions to determine fees incurred in presenting motions after trial and in defending plaintiff's judgments on appeal. This, under the third criterion of the Ross right-to-jury analysis, makes jury determination impractical. We also note that evaluation of attorneys' fees involves questions for which judges, as lawyers, have particular expertise (see Johns v. Klecan (1990), 198 Ill.App.3d 1013, 145 Ill. Dec. 71, 556 N.E.2d 689 (in awarding attorneys' fees trial judge may use knowledge it has acquired in discharge of professional duties to value legal services rendered); Estate of Healy v. Tierney (1985), 137 Ill.App.3d 406, 92 Ill.Dec. 159, 484 N.E.2d 890 (in awarding attorneys' fees trial judge may use own knowledge and experience to assess the time required to complete similar activities)) and which may include companion ethical issues more appropriately handled by judges. Thus, while we are mindful of the constitutionally guaranteed right to a jury trial, we cannot say that the trial court in the instant case abused its discretion in denying Towers' jury demand on the issue of attorneys' fees and costs that were an element of damages but which in part were prospective in nature.
For the foregoing reasons, the judgment of the circuit court of Cook County is affirmed.
Affirmed.
McNULTY and THOMAS J. O'BRIEN, JJ., concur.
NOTES
[1]  Prince attempts to distinguish F.H. Krear & Co. v. Nineteen Named Trustees (2nd Cir.1985), 776 F.2d 1563 on the basis that the amount of attorneys' fees in that case had been "contractually stipulated" and thus did not need to be quantified by the jury. Our reading of that case does not lead to a conclusion that the amount of fees was contractually stipulated to; rather, a more logical reading of the case suggests that the right to fees was so stipulated. If the amount had been stipulated, it would have made no sense for the trial court to have bifurcated the trial on the merits and the trial on the amount of attorneys' fees to be awarded. (776 F.2d at 1563-64.) So, too, the court's recognition in dicta of the right to a trial by jury on the fees issue would be nonsensical if the contract terms set forth the amount of fees recoverable.
