
909 N.E.2d 294 (2009)
O'CONNOR CONSTRUCTION COMPANY, INC., an Indiana Corporation Authorized to do Business in Illinois, Plaintiff-Appellant,
v.
BELMONT HARBOR HOME DEVELOPMENT, LLC, an Illinois Limited Liability Company; Park Plaza Construction, LLC, an Illinois Limited Liability Company and Assignee/Successor of B2BilT, Inc.; Jared Dolce and Jennifer Dolce; James Avila and Patty (Patricia) Avila; Ryan Levin and Dannyella Levin; John Kozak and Catherine Kozak; Ernest A. Sloss; Community Bank of Ravenswood; Citibank Federal Savings Bank; Citimortgage, Inc.; Washington Mutual Bank F.A.; Terre Haute First National Bank; Reinke Gypsum Supply Co., Inc., an Illinois Corporation; Jensen Building Repairs, Inc., an Illinois Corporation; Gallagher Construction Corporation, an Illinois Corporation; Gatewood Crane Service, Inc., an Illinois Corporation; Ashland Propane, Inc., an Illinois Corporation; Harleyellis Corporation a/k/a Environ Harleyellis, a Michigan Corporation Authorized to do Business in Illinois; and Unknown Owners, Non-Record Lien Claimants and Other Interested Parties, Defendants-Appellees.
No. 1-07-2346.
Appellate Court of Illinois, First District, Second Division.
May 19, 2009.
Rehearing Denied June 16, 2009.
*295 Maish & Mysliwy, Hammond, IN (Patrick A. Mysliwy, of counsel), for Appellant.
Robert D. Shearer, Jr., Chicago, for Appellees.
Justice CUNNINGHAM delivered the opinion of the court:
Plaintiff-appellant, O'Connor Construction Company, Incorporated (O'Connor), a subcontractor on the construction of a Chicago residential condominium building, appeals from the amount of damages it was awarded in April 2007, following a bench trial in the circuit court of Cook County on O'Connor's first amended three-count complaint and from the denial of its posttrial petition for attorney fees. In the first count of the complaint O'Connor sought to foreclose on a mechanics lien against all defendants-appellees (all defendants).[1] The trial court awarded damages to O'Connor in the amount of $50,876.50 plus costs and interest of $16,585.74, calculated at the rate of 10% per annum. This amount was in addition to the $175,189.50 already paid to O'Connor by defendant Park Plaza for part of the work. The second count of the complaint sought damages for breach of contract against defendants-appellees Belmont Harbor Home Development, LLC (Belmont Harbor), and Park Plaza Construction, LLC (Park Plaza). The trial court found a breach of contract by Park Plaza and awarded *296 O'Connor $50,876.50 plus costs and interest of $8,292.87, calculated at 5% per annum. This was the same preinterest amount awarded for count I, which foreclosed on a mechanics lien.
On appeal O'Connor asserts that it was entitled to an award of $179,804.94 for damages and interest on count I of its complaint for its mechanics lien foreclosure, and an award of $157,702.22 for damages and interest on count II of its complaint for breach of contact. Because the trial court found for O'Connor on its breach of contract claim asserted in count II, the trial court found that O'Connor's alternative third count based on theories of quantum meruit and unjust enrichment was obviated, and so the court found for Belmont Harbor and Park Plaza on count III. O'Connor does not appeal from the ruling related to count III. O'Connor subsequently filed a posttrial motion and application for attorney fees plus costs pursuant to section 17 of the Mechanics Lien Act (Act) (770 ILCS 60/17 (West 1996)). The trial court refused to award attorney fees but did award fees and costs for mechanics-lien-related filings and recording fees, and costs for the witnesses who testified for O'Connor. On appeal, O'Connor contends that it was entitled to attorney fees of $49,450 based on a rate of $125 per hour.
O'Connor also contends that the trial court failed to apply the proper measure of damages for breach of contract by Park Plaza in relation to count II, because the trial court found that O'Connor had substantially performed its obligations under the contract. O'Connor further contends that the trial court abused its discretion in denying attorney fees permitted under the Act (770 ILCS 60/0.01 et seq. (West 1996)). O'Connor alleges that the trial court erroneously determined that defendant Park Plaza had a good-faith basis, although ultimately erroneous, for failing to make final payments to O'Connor under the contract. O'Connor asserts that this determination by the trial court resulted in a lower amount of damages awarded on counts I and II of the complaint.
We affirm the trial court's determination that O'Connor should prevail on its mechanics lien and breach of contract counts and the award to O'Connor of its costs and fees related to the mechanics lien count. We also affirm the trial court's findings regarding O'Connor's alternative theories in count III. We vacate the remaining judgment of the trial court regarding the amount of damages and interest to be awarded to O'Connor on counts I and II, the mechanics lien and breach of contract claims. We further hold that the trial court's outright rejection of O'Connor's request for attorney fees was erroneous.

BACKGROUND
The relevant facts are recited in the unchallenged findings of fact of the trial court, as set out in its written judgment order. On November 1, 2001, Belmont Harbor, the owner of the property in question, through its managing partner, John McCauley, entered into a written contract with B2BilT, Inc. B2BilT was to be general contractor for the construction of a 7-story condominium building with 24 units (20 single units and 2 double units) at 508 West Melrose Street in Chicago. B2BilT subsequently contracted with O'Connor, for O'Connor to perform the "rough" carpentry and "finish" carpentry for the condominiums. According to the testimony of O'Connor employee Matthew O'Connor, the rough carpentry included roof blocking, window blocking, interior blocking, and installing windows and door bases. The finish or trim carpentry included installing wood trim in the common lobby areas on each floor and, in each unit, installing *297 window extension jambs, interior and entry doors, cabinets, and wood trim.
When B2bilT went out of business in September 2002 during construction, Park Plaza was formed as a limited liability corporation to take its place. By assignment from B2bilT, Park Plaza assumed the duties of general contractor under the original general contract and also assumed B2bilT's rights and obligations under the original contract with O'Connor, along with B2bilT's rights and obligations under numerous contracts with other subcontractors. The trial court found that at the time of these assignments of contracts, the work was already behind schedule and that by allowing O'Connor to continue to perform and be paid for the work beyond the original completion date of November 1, 2002, the parties mutually waived that completion date.
John McCauley, the managing member of Belmont Harbor, admitted on cross-examination that Park Plaza, the successor general contractor, was required by the contract to supply the bulk of the materials for the work before O'Connor could perform. The original contract price quoted by O'Connor was $320,000 and the projected completion date for O'Connor's work was November 1, 2002. As is customary in the industry, any additional work required by O'Connor would be authorized by the general contractor through change orders. Subsequently, 58 additional change orders were agreed to by the parties, increasing the total contract amount due to O'Connor from $320,000 to $351,989. The contract also specified that O'Connor would perform the carpentry work on a floor-by-floor basis. The owner of O'Connor, Timothy O'Connor, testified that he arrived at the original quoted contract price by determining that the cost of materials would be $10,200 and labor costs would be approximately $309,800.
As the work proceeded, O'Connor submitted eight applications for payment to Park Plaza and was paid what it requested, totaling $175,189.50. But in April 2003, Park Plaza instructed the subcontractors, including O'Connor, that the work would no longer be completed floor by floor, but instead the work on each unit would be completed as each unit was sold. By this time the rough carpentry for the building had been completed, so O'Connor began to trim, finish and complete the carpentry work in individual units as they were sold. Also, Park Plaza's project manager, Kevin Bachman, testified that, based upon his observation of the completion of one unit by O'Connor, 50 hours were required to perform the finish carpentry work for each unit. When O'Connor submitted payment applications numbers 9 and 10, Belmont Harbor and Park Plaza disputed the amounts charged and refused to pay O'Connor anything. John McCauley, Belmont Harbor's managing partner, testified that he agreed that at least $47,562.19 of payment was owed to O'Connor at the time when all payment was being withheld. O'Connor ultimately completed the work on one additional unit, but it also requested that Park Plaza deliver the needed materials in a timely fashion so that O'Connor could complete the remainder of the work. When Park Plaza failed to supply the needed materials in a timely way, O'Connor filed its mechanics lien. When O'Connor refused Park Plaza's demand that it rescind its lien, Park Plaza terminated O'Connor from the project on January 27, 2004, and the trial court action followed.
At trial, the court found that Park Plaza and the other defendants had breached the contract by failing to provide O'Connor with the necessary material in a timely way as required by the contract so that O'Connor could complete the project. The *298 trial court also found that O'Connor had substantially performed under the contract and therefore had met its contractual obligations. It awarded damages to O'Connor as we have previously outlined. However, we hold as a matter of law that the trial court utilized the wrong measure of damages and also abused its discretion in failing to consider an award of attorney fees to O'Connor. We affirm the specific rulings regarding the award of fees and costs related to the filings and recording of the mechanics lien and the ruling related to count III which sought equitable relief. We otherwise vacate the judgment of the trial court and remand with directions.

ANALYSIS
As a preliminary matter, we note that under the Act a subcontractor may elect to enforce its rights for breach of contract through the simultaneous use of several remedies, including an action at law for breach of contract against the general contractor and the owners jointly as well as an action in equity to enforce its subcontractor's lien. 770 ILCS 60/28 (West 2006). In this case, O'Connor elected to proceed under alternative theories of foreclosure on its mechanics lien, as well as breach of contract, and the equitable remedies of quantum meruit and unjust enrichment. Of course no double recovery is permitted and O'Connor may only recover to the extent of its damages. Fieldcrest Builders, Inc. v. Antonucci, 311 Ill.App.3d 597, 609, 243 Ill.Dec. 740, 724 N.E.2d 49, 59 (1999).
O'Connor's principal claim on appeal is that the trial court did not use the proper measure of the damages to which O'Connor was entitled for the defendants' breach of contract. We give deference to the trial court's factual findings, but we review its legal conclusions de novo. XLP Corp. v. County of Lake, 359 Ill.App.3d 239, 253, 295 Ill.Dec. 329, 832 N.E.2d 480, 493 (2005). Ordinarily, when a subcontractor has substantially performed its contractual obligations but is prevented by the contractor or the owner from fully performing, the measure of damages is the difference between the unpaid portion of the contract price due to the subcontractor and the cost of completing the work under the terms of the contract. Wilmette Partners v. Hamel, 230 Ill.App.3d 248, 261-62, 171 Ill.Dec. 657, 594 N.E.2d 1177, 1188 (1992); Meyer v. Buckman, 7 Ill.App.2d 385, 404, 129 N.E.2d 603, 613 (1955). This is merely a specific application of general contract damages law, in which the object is to place the injured party in the position they would have been in had the contract been fully performed. Kirkpatrick v. Strosberg, 385 Ill.App.3d 119, 130, 323 Ill. Dec. 755, 894 N.E.2d 781, 792 (2008). As set out in section 347 of the Restatement (Second) of Contracts:
"[T]he injured party has a right to damages based on his expectation interest as measured by
(a) the loss in the value to him of the other party's performance caused by its failure or deficiency, plus
(b) any other loss, including incidental or consequential loss, caused by the breach, less
(c) any cost or other loss that he has avoided by not having to perform." Restatement (Second) of Contracts § 347, at 112 (1981).
Accord, 24 R. Lord, Williston on Contracts § 64:3 (4th ed.2002). The trial court in this case found unequivocally that O'Connor had substantially performed its contractual obligations and that the defendants had breached the contract with O'Connor by failing to provide the necessary materials in a timely fashion and failing to provide a schedule that would have permitted O'Connor to fully perform its *299 contractual obligations. Yet, the trial court awarded damages as outlined above, which were inconsistent with its finding of substantial performance by O'Connor.
We hold that the damages awarded by the trial court were not supported by case law. The trial court's undisputed findings were that had O'Connor completed the contract it would have been entitled to payment of $351,989 (the original contract price of $320,000 plus payment of $31,989 for additional work performed pursuant to agreed additional work orders). The trial court also found that the value of the uncompleted work on the project, including profit of $11,600, was $52,800, leaving defendants with a credit of $41,200 for the unfinished work. O'Connor had already been paid $175,189.50, so the unpaid balance due to O'Connor on the contract amount was $176,799.50. Using this established method of calculating damages, if the cost of completing the project after deducting profit, in this case, $41,200, is subtracted from $176,799.50, O'Connor was entitled to damages of $135,599.50 plus interest (statutorily determined to be 10% per annum for a mechanics lien claim and 5% per annum for a breach of contract claim). The trial court awarded damages, including interest, of $67,462.24 on the mechanics lien claim and $59,169.37 on the breach of contract claim.
It is evident that although the trial court found that the defendants had breached the contract and that O'Connor had substantially performed its contractual obligations, the trial court actually calculated damages on a quantum meruit basis. As noted, the trial court found for the defendants on the third count of the complaint, which was based on quantum meruit and unjust enrichment, because it had found for O'Connor on the breach of contract claim.
In analyzing the calculation of damages for breach of contract, we are guided by a similar case, W.E. Erickson Construction, Inc. v. Congress-Kenilworth Corp., 132 Ill. App.3d 260, 266, 87 Ill.Dec. 536, 477 N.E.2d 513, 518 (1985), aff'd & remanded with directions, 115 Ill.2d 119, 104 Ill.Dec. 676, 503 N.E.2d 233 (1986). In Erickson the trial court found a breach of contract by the defendant and substantial performance by the plaintiff, but greatly reduced the damages to which the plaintiff was entitled. The appellate court found that the trial court apparently proceeded under a theory of quantum meruit, despite having dismissed the plaintiff's claim under that theory. Erickson, 132 Ill.App.3d at 266, 87 Ill.Dec. 536, 477 N.E.2d at 518. Accordingly, the appellate court remanded the case for a proper determination of damages under a theory of substantial performance of the contract. The ruling was later affirmed by our supreme court. Erickson, 115 Ill.2d at 128, 104 Ill.Dec. 676, 503 N.E.2d at 237. In the case before us the trial court also found that the defendants had breached the contract and that the plaintiff, O'Connor, had substantially performed. Yet, the trial court reduced the preinterest damages to which O'Connor was entitled from $351,989 to $267,266. Accordingly, we hold that trial court erred in calculating its award of damages and therefore that award must be vacated and the case remanded for a proper calculation of the damages to which O'Connor is entitled under the theory of foreclosure of a mechanics lien and breach of contract.
O'Connor also challenges the trial court's refusal to award it attorney fees. The trial court found that the defendants had a good-faith basis for refusing to pay O'Connor the money that O'Connor demanded. The defendants argued that O'Connor had unjustifiably attempted to "frontload" its request for payment of *300 overhead and profit to which it was not yet entitled when it submitted its bill. But in fact O'Connor was properly seeking payment under the formula as we have discussed. That formula was the amount due to O'Connor under the contract, less the amount it would cost to complete the work. The Act specifically allows a court to award attorney fees to a party to a contract when the other party has failed to pay the full amount due under the contract without just cause. 770 ILCS 60/17 (West 2006).
We hold that the trial court erred in refusing to consider an award of attorney fees to O'Connor. It is important to note that the defendants acknowledged in the trial court and during oral argument before this court that they knew that O'Connor was owed an undisputed amount of $47,562.19 pursuant to the contract. Yet, the defendants paid O'Connor nothing on that amount and have offered no reasonable explanation for withholding payment on an amount which was not in dispute. Therefore it is clear that O'Connor was entitled to attorney fees. Because the trial court never reached the issue of whether the amount of attorney fees sought by O'Connor was justified and reasonable, we remand the matter to the trial court with directions to conduct a hearing on that issue. See Fontana v. TLD Builders, Inc., 362 Ill.App.3d 491, 511, 298 Ill.Dec. 654, 840 N.E.2d 767, 785 (2005).
For the reasons set forth, we affirm that portion of the trial court's judgment which found the defendants liable on O'Connor's mechanics lien and breach of contract counts, and that portion of the court's award of costs, fees and interest to O'Connor as described. We also affirm the trial court's ruling regarding count III of the complaint. We otherwise vacate the judgment of the trial court regarding the amount of damages awarded on counts I and II and its decision to refuse to consider whether O'Connor was entitled to attorney fees. We remand with directions to calculate the proper amount of damages to which O'Connor is entitled. We also direct the trial court to hold a hearing on the validity of the amount of attorney fees sought by O'Connor.
Affirmed in part and vacated in part; cause remanded with directions.
KARNEZIS, P.J., and SOUTH, J., concur.
NOTES
[1]  "All defendants" includes: Belmont Harbor Home Development, LLC, an Illinois Limited Liability Company; Park Plaza Construction, LLC, an Illinois Limited Liability Company and Assignee/Successor of B2BilT, Inc.; Jared Dolce and Jennifer Dolce, James Avila and Patty (Patricia) Avila; Ryan Levin and Dannyella Levin; John Kozak and Catherine Kozak, Ernest A. Sloss; Community Bank of Ravenswood; Citibank Federal Savings Bank; Citimortgage, Inc.; Washington Mutual Bank F.A.; Terre Haute First National Bank, Reinke Gypsum Supply Co., Inc., an Illinois Corporation; Jensen Building Repairs, Inc., an Illinois Corporation; Gallagher Construction Corporation, an Illinois Corporation; Gatewood Crane Service, Inc., an Illinois Corporation; Ashland Propane, Inc., an Illinois Corporation; Harleyellis Corporation a/k/a Environ Harleyellis, a Michigan Corporation Authorized to do Business in Illinois; and unknown owners, non-record lien claimants and other interested parties.
