
67 Cal.2d 87 (1967)
MARCUS LOWY et al., Plaintiffs, Cross-defendants, and Appellants,
v.
UNITED PACIFIC INSURANCE COMPANY, Defendant and Respondent; ARNOLD WOLPIN, Defendant, Cross-complainant, and Respondent.
L. A. No. 28759. 
Supreme Court of California. In Bank.  
July 21, 1967.
 Adelman & Schwartz, Ball, Hunt & Hart, Joseph A. Ball and Joseph D. Mullender, Jr., for Plaintiffs, Cross-defendants and Appellants.
 Milton Zerin and Morton Minikes for Defendant and Respondent and for Defendant, Cross-complainant and Respondent.
 McCOMB, J.
 Plaintiffs appeal from a judgment in favor of defendant Arnold Wolpin (hereinafter referred to as "defendant") on a cross-complaint for damages for breach of an excavation and grading contract.
 Facts:plaintiffs, owners and subdividers, entered into a contract with defendant, a licensed contractor, for certain excavation and grading work on lots and streets, together with street improvement work consisting of paving the streets and installing curbs and gutters, in a subdivision containing 89 residential lots.
 After defendant had performed 98 percent of the contracted excavation and grading work, a dispute arose between the parties regarding payment of $7,200 for additional work, consisting of importing dirt for fills, necessitated by changes made by plaintiffs in the plans.
 Defendant ceased performance.plaintiffs immediately employed others to do street improvement work called for by the contract and thereafter sued defendant and his bonding company for breach of contract. Defendant answered and cross-complained for damages for breach of contract and reasonable services rendered. The trial court determined that plaintiffs were entitled to nothing against defendant and his bonding company and allowed defendant recovery on his cross-complaint.
 Questions: First. Was the contract between the parties divisible and the doctrine of substantial performance applicable?
 Yes.
 The contract provided, in part, as follows: "[Defendant] agrees to provide and pay for all materials, labor, tools, equipment, light, transportation and other facilities necessary for the execution, in a good and workmanlike manner, of all the following described work: Excavation, Grading and Street Improvements in Tracts No. 26589 and 19517 in accordance with plans and specifications ... and Exhibit 'A' attached hereto. ... *90"
 "The price which [plaintiffs] shall pay [defendant] for performing his obligations, as aforesaid or as hereunder set forth, is at the following prices indicated: ..."
 "See Exhibits 'A' and 'B' attached hereto." (Italics added.)
 Exhibit "A" states in part: "[Defendant] agrees to furnish all equipment, labor and material necessary for street improvements, onsite and offsite grading, grade and excavation and erosion control on Tracts 26589 and 19517 ... for the lump sum price of Seventy-Three Thousand, Five Hundred Dollars ($73,500.00) including, without limitation, all grading, compaction, cleaning, grade and erosion control and dumping, all of which are to be performed to satisfaction of [plaintiffs]. ..." (Italics added.)
 The construction of pavement, curbs and gutters is not included in the list of specific items for which the sum of $73,500 is to be paid.
 Exhibit "B" lists 45 unit prices ranging from $.04 to $4.50 per unit for use in the computation of the amount to be charged for the performance of that part of the street improvement work consisting of paving the streets and installing curbs and gutters. The unit prices are entirely unrelated to excavation and grading.
 The contract further provides: "In invoicing [plaintiffs], multiply all the final quantities by the unit prices set forth in Exhibit 'B.' All quantities will be determined by Delta Engineering & Surveying Co. and approved by [defendant] and [plaintiffs], with the exception of grading, etc., mentioned in Exhibit 'A' of this Agreement, which is a lump sum price for a complete job without any limitations." (Italics added.)
 The latter paragraph of the contract shows clearly that the lump sum of $73,500 was not intended to include payment for paving the streets and installing curbs and gutters.
 The trial court found that under the contract there were two phases of work to be performed, (1) grading and (2) street improvements; that defendant performed all the terms and conditions thereof relating to grading, except work which could be completed for $1,470, being 2 percent of the total grading cost contracted for; that defendant performed additional grading work, reasonably worth $7,200, necessitated by changes in plans on the part of plaintiffs and not attributable to defendant, which additional work was also authorized by plaintiffs through their superintendent; that plaintiffs *91 breached the contract by employing others to do street improvement work and by not making payments to defendant for grading work done by him when due, thereby excusing further performance by defendant; and that defendant was entitled to recover on his cross-complaint for damages, as follows:
 [Tabular Material Omitted]
 The trial court also found that defendant was entitled to reasonable attorney's fees in the sum of $4,000, the contract providing for reasonable attorney's fees to be awarded to the prevailing party in any action brought to enforce the terms and conditions thereof.
 The trial court further found that defendant had breached that portion of the contract relating to street improvement work and was not entitled to recover damages for loss of profits in connection therewith.
 [1] As indicated above, the contract required the performance of two kinds of work. First, certain excavation and grading work was to be done on lots and streets. Thereafter, street improvement work, consisting of paving the streets and installing curbs and gutters was required.
 Plaintiffs agreed to pay defendant for the excavation and grading work (including street grading work) the sum of $73,500, as set forth in Exhibit "A" of the contract; and they agreed to pay defendant for the paving of the streets and the installation of curbs and gutters (all commonly called "street improvement work") pursuant to the unit prices set forth in Exhibit "B" of the contract.
 Accordingly, since the consideration was apportioned, the contract was a severable or divisible one.  [fn. 1] (See Keene v. Harling, *92 61 Cal.2d 318, 323 [5] [38 Cal.Rptr. 513, 392 P.2d 273]; Simmons v. California Institute of Technology, 34 Cal.2d 264, 275 [14] [209 P.2d 581].)
 Before defendant commenced the excavation and grading work, for which a lump sum price of $73,500 was set by the contract, he gave a surety bond for $73,500. When the excavation and grading work was nearing completion, and it was almost time for work under the second phase to begin, plaintiffs requested that defendant provide a surety bond for "street improvements" in the sum of $125,000, stating that "no work should be performed on any portion of the street improvement portion of the contract until such bond is furnished." Thus, it is clear that the parties treated the contract as a divisible one.
 Under the circumstances, the fact that defendant did not perform the second phase of the contract does not prevent his recovering for work done under the first phase.
 Defendant did not entirely perform under the first phase of the contract. However, the doctrine of substantial performance, ordinarily applied to building contracts, is here applicable, since the evidence shows that defendant completed 98 percent of the work under the first phase and was prevented from completing the balance through the fault of plaintiffs.
 [2] Where a person agrees to do a thing for another for a specified sum of money, to be paid on full performance, he is not entitled to any part of the sum until he has himself done the thing he agreed to do, unless full performance has been excused, prevented, or delayed by the act of the other party. (Thomas Haverty Co. v. Jones, 185 Cal. 285, 288-289 [197 P. 105].)
 In Thomas Haverty Co. v. Jones, supra, at page 289 [1], we held that in the case of a building contract where the owner has taken possession of the building and is enjoying the fruits of the contractor's work in the performance of the contract, if there has been a substantial performance thereof by the contractor in good faith, if the failure to make full performance can be compensated in damages to be deducted from the price *93 or allowed as a counterclaim, and if the omissions and deviations were not wilful or fraudulent and do not substantially affect the usefulness of the building or the purpose for which it was intended, the contractor may, in an action upon the contract, recover the amount of the contract price remaining unpaid, less the amount allowed as damages for the failure of strict performance.
 Reference to the computation of items, both debit and credit, set forth in the findings in the present case, reveals an almost literal compliance with the formula approved in the Haverty case, supra; and there is substantial evidence to support the trial court's finding that plaintiffs themselves breached the contract and thus made impossible full performance on defendant's part.
 [3] Second. Are plaintiffs entitled to a setoff in the amount of $8,602.71, representing a payment by them to Hooker Company after defendant ceased performance under the contract?
 No. In their complaint, plaintiffs alleged that by reason of defendant's failure to complete the grading work, they were required to expend a total of $119,578.73 to have the work done, or $46,078.73 in excess of the $73,500 for which defendant had agreed to do it.
 Evidence introduced to prove this allegation included an invoice for $8,602.71, dated May 31, 1963, covering work done by Hooker Company during the period May 16 through May 29, 1963.  [fn. 2]
 Plaintiffs now claim that they should be allowed credit for at least the amount of the invoice above referred to, in addition to the credits allowed by the trial court, arguing that defendant is liable for the cost to them to complete the grading work and that the invoice covered only grading work.
 As indicated above, the trial court specifically found that defendant had completed all the grading required to be done by him under the contract except work which could be completed for $1,470, and plaintiffs were allowed credit for that sum in the determination of the amount due defendant. There *94 was substantial evidence to support this finding,  [fn. 3] and plaintiffs are therefore bound thereby and are not entitled to the further credit now claimed. (See Leonard v. Rose, 65 Cal.2d 589, 593 [5] [55 Cal.Rptr. 916, 422 P.2d 604]; Brinkman v. Liberty Mutual etc. Ins. Co., 63 Cal.2d 41, 44 [1] [45 Cal.Rptr. 8, 403 P.2d 136].)
 [4] Plaintiffs urge that even if, as defendant contended in the trial court, the invoice covered street improvement work, the amount is still chargeable to defendant, because he did not repudiate the contract until June 6, 1963, and should therefore be held for any expenditures incurred prior to that date in performing the work required to be done by him under the street improvement portion of the contract.
 In the trial court, however, plaintiffs limited their demands to damages suffered by them by reason of defendant's having failed to complete the grading work. Under the circumstances, they are precluded from claiming here that they are entitled to any other damages. (Dimmick v. Dimmick, 58 Cal.2d 417, 422 [4, 5] [24 Cal.Rptr. 856, 374 P.2d 824]; Peoples Finance etc. Co. v. Mike- Ron Corp., 236 Cal.App.2d 897, 903-904 [3] [46 Cal.Rptr. 497].)
 [5] Plaintiffs also contend that there is no evidence to support the trial court's finding that defendant was entitled to recover $7,200 for additional grading work performed by him necessitated by changes in plans on the part of plaintiffs and not attributable to defendant. It would appear, however, that there is substantial evidence to support the finding,  [fn. 4] and *95 plaintiffs are therefore bound by it on appeal. (French v. Brinkman, 60 Cal.2d 547, 550 [4] [35 Cal.Rptr. 289, 387 P.2d 1]; Primm v. Primm, 46 Cal.2d 690, 693 [1] [299 P.2d 231].)
 The judgment is affirmed.plaintiffs are ordered to pay to defendant Wolpin additional attorney's fees on this appeal in an amount to be determined by the trial court.
 Traynor, C. J., Peters, J., Tobriner, J., Mosk, J., Burke, J., and Sullivan, J., concurred.
 " 'A contract is divisible where by its terms, 1, performance of each party is divided into two or more parts, and 2, the number of parts due from each party is the same, and 3, the performance of each part by one party is the agreed exchange for a corresponding part by the other party.' " (6 Williston, Contracts (3d ed. 1962)  860, pp. 252-254.)
 In June 1963, when negotiations to settle the dispute over defendant's claim for additional work broke down, plaintiff employed Hooker Company to perform the second phase of the contract.
 It was also shown that on March 29, 1963, plaintiff Lowy personally authorized payment to defendant based on 91 percent completion of the grading, and on May 13, 1963, plaintiffs' soil engineer and their counsel wrote letters stating that the grading work had been completed except for that required on the three lots just referred to.
 However, plaintiffs were entitled to make a draw on their loan from the lending institution when the sewers were put in the streets, and they therefore requested defendant to proceed with the grading of the streets prior to completion of the grading of the lots.
 At that time, plaintiffs' representative assured defendant that if he would proceed with the grading of the streets, so that the sewers could be put in prior to the time the lot grading was completed, and if it developed that more soil was needed, such soil could be obtained from cutting down a hill on the rear of the tract, as a result of which it would not be necessary to go off the site to import soil.
 Based on this representation, defendant graded the streets before completing the grading of the lots, and the sewers were put in. Later, it developed that additional soil was needed for fill on the lots. Since the sewers were in, it could not be obtained by lowering the grade of the streets; and it was learned that for geological reasons cutting down of the hill would not be permitted.
 Since it may be inferred from the above evidence that it was plaintiffs' fault that additional soil had to be imported, there is adequate support for the trial court's finding that defendant was entitled to recover for the additional work performed.
NOTES
[fn. 1]  1. Williston defines a divisible contract, as follows: "A contract under which the whole performance is divided into two sets of partial performance, each part of each set being the agreed exchange for a corresponding part of the set of performances to be rendered by the other promisor, is called a divisible contract. Or, as expressed in the cases:
[fn. 2]  2. Hooker Company was a subcontractor engaged by defendant the middle of May 1963 to complete the work remaining to be done by him under the contract, after a previous subcontractor engaged by him had ceased work. At that time, it was agreed that plaintiff would pay Hooker Company and charge defendant for the amount of the payments so made.
[fn. 3]  3. There was evidence that as of the time defendant stopped work, all the grading had been done except on three lots on which catch basins had been installed pursuant to requirements of the City of Los Angeles during the rainy season.
[fn. 4]  4. The grading plans provided that the grading of the streets would be done last, so that if there was not enough soil for the fill required for the lots, the level of the streets could be lowered and the soil taken therefrom used for the necessary fill, or if there was too much soil from the cutting of the lots, the excess soil could be used to raise the level of the streets.
