
800 N.E.2d 448 (2003)
344 Ill. App.3d 493
279 Ill.Dec. 380
Melinda SCHWEIHS, Plaintiff-Appellant,
v.
DAVIS, FRIEDMAN, ZAVETT, KANE AND MacRAE and James L. Rubens, Defendants-Appellees.
No. 1-01-3994.
Appellate Court of Illinois, First District, First Division.
November 3, 2003.
*449 Patrick J. Sherlock, Chicago, and Loren J. Mallon, Northbrook, for Appellant.
Katz Randall Weinberg & Richmond, Chicago (Warren Lupel and Jonathan D. Sherman, of counsel), and Davis, Friedman, Zavett, Kane and MacRae and James L. Rubens, for Appellees.
Justice McNULTY delivered the opinion of the court:
Illinois courts began working on the divorce of Daniel and Melinda Schweihs in 1989. This case is further litigation related to that divorce. Following several appeals in the divorce proceeding and related litigation, Melinda brought this lawsuit charging her divorce attorneys with malpractice. She had attempted to appeal from an order awarding attorney fees to be paid from the marital estate to her husband's attorneys. This court dismissed the appeal because Melinda's attorneys did not file a timely notice of appeal.
The trial court granted Melinda's attorneys summary judgment, finding that Melinda would not have won any relief even if her attorneys had filed a timely notice of appeal. Melinda now appeals again. This time we have jurisdiction.
We agree with the trial court that Melinda would not have won on appeal, and we affirm the judgment against Melinda on her claims for the fees the marital estate paid to Daniel's attorneys. But we find that Melinda has presented sufficient evidence to create a material issue of fact as to whether the attorneys breached their contract with her, and whether that breach *450 entitles her to a refund of the fees she paid them for the appeal they failed to timely file. Therefore we affirm the judgment in part, reverse in part, and remand for yet further proceedings.

BACKGROUND
In 1988 two directors of Disciplined Investment Advisors (DIA) voted to terminate DIA's employment of Daniel, a shareholder of DIA. DIA then sued to enjoin Daniel from telling DIA's clients that he represented DIA. Daniel countersued the directors for breach of their fiduciary duties to shareholders of DIA.
Daniel petitioned for divorce from Melinda in 1989. He admitted that the marital estate included his counterclaim against the directors of DIA. In the course of the divorce litigation, the parties contested numerous issues concerning temporary child support, maintenance, and the disposition of marital assets. On January 3, 1990, the court entered an order memorializing the agreed resolution of a number of these issues. The order included the following provision:
"The presently outstanding attorney fees to be paid in connection with Daniel's Disciplined Investment Advisors litigation (DIA) including all contingency fees shall not exceed 331/3 of the ultimate recovery by settlement or trial. Should Daniel volunteer fee payments in excess of 331/3 the trial court herein shall have jurisdiction to determine the allocation thereof in the division of marital property."
On July 17, 1990, Daniel signed an agreement with the law firm of Spence, Moriarity & Schuster (SMS), in which SMS agreed to represent Daniel in his lawsuit against the directors of DIA in exchange for "40% of the gross amount received." The letter agreement explained:
"The above fees apply to any and all amounts recovered for me, including amounts recovered for the value of my stock in the company. By `gross amount,' I mean that sum received before any expenses that have been advanced by you have been deducted from the amount received."
Melinda moved to compel Daniel to settle the lawsuit and use the settlement funds to support his children. Daniel, through SMS, opposed the motion. In 1994, after the parties exhausted all other assets including the marital home, the court ordered Daniel to sell his cause of action against the directors of DIA, in effect ordering Daniel to settle the case. The directors had offered $4.7 million to be paid over 10 years. The court ordered acceptance of that offer.
SMS petitioned for an award of 40% of the settlement amount as their attorney fees under the contract with Daniel. An attorney representing the children of Daniel and Melinda also petitioned for fees, as did a law firm that initially represented Daniel in the DIA litigation. Following hearings the trial court found the present value of the settlement to be $3,950,000.
The judge held:
"Dan Schweihs individually did not have the authority to bind the marital estate to the 40-percent contingent fee contract. And this agreement is unenforceable. The contingent fee agreement of up to one-third of the gross amount received is enforceable."
Attorneys later asked for clarification of whether the judge meant that the contingent fee contract was entirely unenforceable "[a]gainst anyone." The court answered that Daniel "could not bind the marital estate," but "[o]bviously, he could bind himself."
*451 From the marital estate the court awarded the petitioning attorneys fees totaling one-third of the present value of the settlement, allocating $128,232.92 to the attorney for the children, $67,054.63 to the previously discharged law firm, and $1,171,379.16 to SMS.
James Rubens, of the law firm of Davis, Friedman, Zavett, Kane & MacRae (Davis), had represented Melinda throughout the divorce litigation. Melinda asked Rubens to appeal the award of fees to SMS. Rubens filed a notice of appeal and several briefs in the appellate court. Davis charged Melinda about $26,000 for taking the appeal. In 1997, we dismissed the appeal for lack of jurisdiction because the notice of appeal was not timely filed.
Melinda filed this lawsuit for malpractice in 1999. She alleged that the appellate court would have reduced or eliminated fees for SMS if Rubens had filed a timely notice of appeal. She sought damages to reflect the reduction in fees the appellate court would have ordered, and she sought a refund of fees paid to Davis for the appeal.
Rubens and Davis supported their motion for summary judgment with the appellate briefs filed before we dismissed the appeal in 1997. The trial court agreed with Rubens and Davis that none of the arguments raised in the briefs would have succeeded even if Rubens had filed a timely notice of appeal. The court noted that Melinda would have incurred all the fees she paid, and she would have obtained no better result, if the appeal had been timely filed. Thus, the court held that Melinda "did not incur the $26,000 in alleged damages because of [the] failure to timely file the appeal." The court granted Rubens and Davis summary judgment on all claims for relief.

ANALYSIS
We review the summary judgment de novo. Travelers Insurance Co. v. Eljer Manufacturing, Inc., 197 Ill.2d 278, 292, 258 Ill.Dec. 792, 757 N.E.2d 481 (2001).
Melinda argues first that if Rubens had timely filed the notice of appeal, the marital estate would not have paid any fees to SMS because Rule 1.5(d) of the Rules of Professional Conduct forbids contingent fee contracts in dissolution proceedings. 134 Ill.2d R. 1.5(d)(1). The rule provides that no lawyer shall collect
"any fee in a domestic relations matter, the payment or amount of which is contingent upon the securing of a dissolution of marriage or upon the amount of maintenance or support, or property settlement in lieu thereof; provided, however, that the prohibition set forth in Rule 1.5(d)(1) shall not extend to representation in matters subsequent to final judgments in such cases[.]" 134 Ill.2d R. 1.5(d)(1).
The rule on its face does not preclude contingent fee contracts in all cases bearing some relation to dissolution proceedings. In re Marriage of Wright, 89 Ill.2d 498, 501, 61 Ill.Dec. 140, 434 N.E.2d 293 (1982). For example, courts have enforced contingent fee contracts for collection of unpaid child support and maintenance, even though the court entered the order to be enforced as part of a proceeding for dissolution of marriage. Fletcher v. Fletcher, 227 Ill.App.3d 194, 198, 169 Ill. Dec. 211, 591 N.E.2d 91 (1992). And our supreme court enforced a contract providing that the wife's attorney would recover fees from the wife's share of proceeds from separate litigation against the husband. Wright, 89 Ill.2d at 501, 61 Ill.Dec. 140, 434 N.E.2d 293.
In Licciardi v. Collins, 180 Ill.App.3d 1051, 129 Ill.Dec. 790, 536 N.E.2d 840 (1989), an attorney collected a contingent *452 fee he earned by obtaining a modification of property distribution ordered in a dissolution proceeding. The client later sued for return of the fee on grounds that the contingent fee contract violated the predecessor of Rule 1.5(d). The trial court ordered the attorney to return the contingent fee. The appellate court agreed with the attorney that our supreme court designed the rule "to prevent the encouragement of divorce and the hindrance of reconciliation which could result if attorneys were given financial interests in property settlements." Licciardi, 180 Ill.App.3d at 1061, 129 Ill.Dec. 790, 536 N.E.2d 840. The court held that the policy
"is best served by prohibiting attorneys from acquiring contingent financial interests in all domestic relations cases involving the division of marital property between either spouses or former spouses. That is, we believe the public policy behind the rule so important that, as long as an attorney's services are employed with respect to the division of marital property, the rule bars contingent fees therefor." Licciardi, 180 Ill.App.3d at 1061, 129 Ill.Dec. 790, 536 N.E.2d 840.
The appellate court affirmed the order requiring the attorney to return the contingent fee.
Here, SMS did not work on the distribution of property in the dissolution proceeding. The distribution of marital assets ordered in the dissolution proceeding had no effect on the amount of the contingent fee or the financial interests of SMS. If SMS achieved a better result for its client, the result would increase the amount available for distribution to Melinda as well as Daniel. SMS did not work to alter or influence the distribution of assets in the dissolution action. Melinda effectively acknowledged that a contingent fee contract might be appropriate for Daniel's lawsuit against DIA directors when she agreed to the order permitting an award of up to 331/3 of the ultimate recovery in that lawsuit.
We agree with Rubens and Davis that the contingent fee here does not offend public policy. It is like a contingent fee for representation in a case involving an automobile accident, where the client happens to be in the process of marital dissolution and the lawsuit is an asset of the marital estate. Since success in the litigation concerning the accident increases the total available for distribution to the parties to the divorce, without affecting the distribution of the property between the parties (see In re Marriage of Burt, 144 Ill.App.3d 177, 98 Ill.Dec. 746, 494 N.E.2d 868 (1986); In re Marriage of Pace, 278 Ill.App.3d 932, 935-36, 215 Ill.Dec. 923, 664 N.E.2d 320 (1996)), a contingent fee for representation in the tort litigation does not offend public policy. Because the litigation between Daniel and DIA did not affect the division of marital property, a contingent fee for representation in that litigation does not violate Rule 1.5(d)(1). See Licciardi, 180 Ill.App.3d at 1061, 129 Ill.Dec. 790, 536 N.E.2d 840; Wright, 89 Ill.2d at 501, 61 Ill.Dec. 140, 434 N.E.2d 293. The appellate court would not have granted Melinda relief on the basis of public policy, even if Rubens had filed a timely notice of appeal.
Next, Melinda contends that the trial court lacked authority to alter the contingent fee contract from the 40% provided in the letter agreement to the 331/3 permitted by the agreed order. In general, courts will enforce contracts as written, and they will not rewrite a contract to suit one of the parties. Klemp v. Hergott Group, Inc., 267 Ill.App.3d 574, 581, 204 Ill.Dec. 527, 641 N.E.2d 957 (1994). But courts have a duty to guard against the collection of excessive attorney fees, both contingent and fixed, even if a contract *453 specifies such excessive fees. XL Disposal Corp. v. John Sexton Contractors Co., 168 Ill.2d 355, 360, 213 Ill.Dec. 665, 659 N.E.2d 1312 (1995). Thus courts have the authority to evaluate contingent fee contracts to ensure that the contracts do not result in excessive fees. In re Doyle, 144 Ill.2d 451, 463, 163 Ill.Dec. 515, 581 N.E.2d 669 (1991).
In re Estate of Sass, 246 Ill.App.3d 610, 186 Ill.Dec. 512, 616 N.E.2d 702 (1993), shows that the court has the power to reform a contingent fee agreement to provide for a fee the court finds reasonable. In Sass the attorney settled a wrongful death action for $250,000 and sought to enforce the contract for a contingent fee of one-third of the settlement. The trial court found the attorney's work did not justify the award of $83,000 in fees. Sass, 246 Ill.App.3d at 612, 186 Ill.Dec. 512, 616 N.E.2d 702. The court awarded the attorney $41,666, one-sixth of the settlement, as the appropriate fee. Sass, 246 Ill.App.3d at 613, 186 Ill.Dec. 512, 616 N.E.2d 702. The appellate court affirmed the award of one-half the amount called for in the contingent fee contract, finding no abuse of discretion. Sass, 246 Ill.App.3d at 615-16, 186 Ill.Dec. 512, 616 N.E.2d 702.
The trial court here similarly had discretion to award fees less than the amount called for in the contract. The court found that it could not enforce the contingent fee contract against the marital estate because Melinda did not sign or agree to that contract. Instead the court found that the agreed order gave Daniel authority to bind the estate for a contingent fee of one-third of the amount recovered, while Daniel retained the power to bind himself to a greater fee of his own choosing. Although the court held the contingent fee contract not fully enforceable against the marital estate, the court concluded that the contract between Daniel and SMS bound the estate to payment of a contingent fee of one-third of the amount recovered in the litigation against the directors of DIA.
Melinda contends that the finding that the contract was not enforceable against the estate conflicts with the partial enforcement the court ordered. We see no inconsistency. The agreed order on its face supports the finding that Melinda authorized Daniel to bind the marital estate to payment of contingent and other fees totaling up to one-third of the settlement obtained in the litigation against the DIA directors. The court appropriately held that SMS could enforce the contract to the extent of recovering its share of a one-third contingency fee from the marital estate, while retaining the right to recover from Daniel the difference between the authorized fee and the 40% fee to which Daniel agreed. Melinda would not have obtained relief from the appellate court based on the unenforceability of the contract even if Rubens had filed a timely notice of appeal.
Next, Melinda contends that the appellate court would have reduced the fee paid to SMS because the contingent fee contract limits the fee to the portion of the settlement allocated to Daniel. She pins the argument on the provision in the contract that the 40% fee applies to amounts recovered by Daniel, without mentioning the marital estate. The issue is a matter of contract interpretation.
We must construe the contract as a whole to give effect to the intention of the parties. Owens v. McDermott, Will & Emery, 316 Ill.App.3d 340, 344, 249 Ill.Dec. 303, 736 N.E.2d 145 (2000). We discern the intention from the language of the contract, viewed in light of the apparent purposes of the parties at the time they entered into the contract. DeWitt County Public Building Comm'n v. County of DeWitt, *454 128 Ill.App.3d 11, 18, 83, Ill.Dec. 82, 469 N.E.2d 689 (1984).
In the letter agreement Daniel specifically hired SMS to represent him in his suit against the directors of DIA. The contract provides:
"[SMS may] take whatever action may be necessary * * * to recover for me the loss and damages which have been sustained by me as a result of this incident."
In this context, Daniel agreed to pay "40% of the gross amount received" in settlement of the DIA litigation. That gross amount qualifies as marital property for the court to distribute in the dissolution proceedings. See Pace, 278 Ill.App.3d at 935, 215 Ill.Dec. 923, 664 N.E.2d 320. As the parties intended to arrange for SMS to obtain a maximal recovery in the DIA litigation to compensate for all damage Daniel suffered due to the actions of DIA directors, the contract apparently calls for fees of 40% of the total recovered in that litigation, and not just 40% of the part of the total recovery allocated to Daniel in the dissolution proceedings.
Were we to interpret the contingent fee contract to apply to only the portion of the DIA settlement allocated to Daniel in the dissolution proceedings, the fee SMS recovered would depend upon the amount the court hearing dissolution proceedings allocated to Daniel. As such, the contract would give SMS a "contingent financial interest[] in [a] domestic relations case[] involving the division of marital property." Licciardi, 180 Ill.App.3d at 1061, 129 Ill. Dec. 790, 536 N.E.2d 840. Thus, under Melinda's interpretation of the fee contract, the contract appears to violate the public policy reflected in Rule 1.5(d)(1) of the Rules of Professional Conduct. 134 Ill.2d R. 1.5(d)(1). Our supreme court directs us to prefer contract constructions that render contracts enforceable rather than illegal. Braye v. Archer-Daniels-Midland Co., 175 Ill.2d 201, 217, 222 Ill.Dec. 91, 676 N.E.2d 1295 (1997).
We agree with the trial court that the contingent fee in Daniel's contract with SMS, enforceable against Daniel, establishes attorney fees of 40% of the amount recovered from the directors and DIA in the DIA litigation, regardless of allocation between parties to the dissolution proceedings. The trial court had authority to hold the marital estate liable, under the agreed order, for fees totaling one-third of the settlement. Thus, we find that Melinda would have lost her appeal even if Rubens had filed it within the appropriate time.
Melinda also seeks a return of the fee she paid Davis to pursue the appeal. She alleges in her complaint that Rubens negligently failed to file the notice within the proper time and thereby lost Melinda's right to appeal.
Ochoa v. Maloney, 69 Ill.App.3d 689, 26 Ill.Dec. 22, 387 N.E.2d 852 (1979), bears some similarity to this case. The plaintiff in that case paid the defendant $3,500 to appeal the criminal conviction of the plaintiff's son. The defendants filed a notice of appeal but failed to file a timely brief. After the appellate court dismissed the appeal, the plaintiff sued the defendants for refund of the fees paid plus punitive damages. Although the court reinstated the son's appeal, the court ordered the defendants to return to the plaintiff the $3,500 she paid them. Ochoa, 69 Ill.App.3d at 692, 26 Ill.Dec. 22, 387 N.E.2d 852.
Levan v. Richter, 152 Ill.App.3d 1082, 105 Ill.Dec. 855, 504 N.E.2d 1373 (1987), also guides our decision. In that case the plaintiffs hired the defendant to construct a swimming pool and made a $1,300 down payment on the pool. The defendant completed construction and filled the pool with *455 water. Much of the water drained out of the pool into the ground within two days. The defendant had failed to comply with contract specifications. The pool would not hold water and could not be repaired. Levan, 152 Ill.App.3d at 1086, 105 Ill.Dec. 855, 504 N.E.2d 1373. The appellate court held that the defendant breached the contract by failing to supply a pool that could hold water. The court awarded the plaintiffs damages for the breach of contract, including the cost of removing the pool, the cost of restoring the site, and reimbursement of all funds the plaintiffs paid the defendant for the pool. Levan, 152 Ill.App.3d at 1088, 105 Ill.Dec. 855, 504 N.E.2d 1373.
Melinda paid Davis about $26,000 in fees specifically for an appeal from the award of fees to SMS. Davis failed to file a timely appeal, thereby waiving Melinda's right to appellate review of the fee award. Davis provided nothing of value to Melinda in exchange for her $26,000. An unfiled appeal, even if attorneys worked long hours preparing appellate briefs, is much like a pool that holds no water. It does not serve the most basic function of that for which the client paid. Rubens and Davis apparently breached their contract to appeal from the fee award when they failed to file a timely notice of appeal.
We recognize that Melinda phrased her complaint as one for legal malpractice rather than breach of contract. But the tort of legal malpractice usually involves breach of an attorney's contractual duties. Christison v. Jones, 83 Ill.App.3d 334, 338, 39 Ill.Dec. 560, 405 N.E.2d 8 (1980). A breach of contract claim need only restate the malpractice count, with no additional allegations. Land v. Greenwood, 133 Ill.App.3d 537, 541, 88 Ill.Dec. 595, 478 N.E.2d 1203 (1985). We find that permitting amendment of the complaint to state a cause of action for breach of contract would further the ends of justice. See Willis v. Ohio Casualty Co., 101 Ill.App.3d 1099, 1108, 57 Ill.Dec. 381, 428 N.E.2d 1061 (1981).
We agree with the trial court's finding that Melinda would not have won her appeal from the award of fees to SMS. We affirm the decision to dismiss claims for relief dependent upon Melinda's ability to succeed on that appeal. However, we find that the complaint sufficiently states facts showing that Rubens and Davis breached their contract to file an appeal from the award of fees to SMS. On a claim for breach of contract Melinda appears to be entitled to a return of fees she paid for Rubens and Davis to file an appeal. Therefore we affirm in part, reverse in part and remand for further proceedings consistent with this opinion.
Affirmed in part and reversed in part; cause remanded.
GORDON and McBRIDE, JJ., concur.
