
625 P.2d 831 (1980)
ALASKA STATE HOUSING AUTHORITY, Appellant,
v.
WALSH & COMPANY, INC., Appellee.
WALSH & COMPANY, INC., Cross-Appellant,
v.
ALASKA STATE HOUSING AUTHORITY, Cross-Appellee.
Nos. 3679, 3680.
Supreme Court of Alaska.
December 19, 1980.
*832 Allen McGrath, Graham & James, Anchorage, for appellant/cross-appellee.
D.A. Burr, Burr, Pease & Kurtz, Inc., Anchorage, for appellee/cross-appellant.
*833 Before RABINOWITZ, C.J., CONNOR, BOOCHEVER and MATTHEWS, JJ., and DIMOND, Senior Justice.[*]

OPINION
CONNOR, Justice.
On July 28, 1972, Walsh & Co., Inc., entered into a contract with the Alaska State Housing Authority whereby Walsh agreed to construct a gravel surface road in the Bethel Heights Low Rent Housing Project, a subdivision of Bethel, Alaska. According to the plans and technical specifications incorporated into the contract, the road was to be constructed of twelve inches of crushed rock surfacing. Specifications for the grade and facet characteristics of this surfacing were also included in the contract. In addition, the agreement provided that the road was to be completed on or before December 30, 1972, and contained a liquidated damages clause which provided that the contractor would be assessed damages of $100 each calendar day, beyond the deadline, until completion, in the event the road was not completed on time.
The contract also required that a 12-inch layer of compacted wood chips be placed below the gravel surface, in order to insulate the gravel surface course from the tundra material below.[1]
A pre-construction conference was held on August 21, 1972. During the course of that meeting, an executive officer of Walsh, Edmund C. Enders, indicated that the contractor intended to obtain base material for the crushed surfacing to be used in the project from federal government property at Platinum, Alaska. Chalmers Ekness, ASHA's architect for the project, asked Enders to arrange to have a sample of the Platinum material submitted to him for approval. Although there is conflict over whether Enders actually refused this request, no such sample was provided to Ekness.
Walsh subsequently barged substantial quantities of the Platinum material to the Bethel jobsite. The first load arrived on or about August 30, 1972. Approximately three weeks later it was examined by ASHA inspectors who concluded that it would not satisfy the technical specifications of the contract.
On September 22, 1972, ASHA informed Walsh in writing that the Platinum material was "non-compliant" and directed the contractor not to incorporate it into the project. Walsh responded that the material did comply with the requirements of Technical Specification § 2.4, according to independent testing which the contractor had procured. Shortly thereafter it became clear that the central issue of the controversy was whether the specification required the surfacing to be one hundred per cent mechanically crushed. Walsh claimed that the surfacing merely had to satisfy the grading specifications of Alaska Method T-7, with at least fifty per cent of the material retained on the No. 4 screen possessing two or more fractured faces. ASHA, on the other hand, took the position that the material not only had to satisfy these requirements, but also had to be the product of mechanical crushing so as to ensure that all gradations within the composite material contained particles possessing fractured faces. This issue was important insofar as increased particulate angularity improves the degree to which the particles interlock, a factor directly related to the overall suitability of the aggregate as a road surface.
On September 26, 1972, Walsh advised ASHA by letter that none of the Platinum material would be used in the project, stating: "We have no alternative but to comply *834 with your directive." Shortly thereafter, Walsh clarified its position in another letter to ASHA which stated in pertinent part:
"A thorough study of the specification and of your interpretation as we understand it, leaves us no alternative but to advise you that we cannot accept your interpretation.
.....
In order for Walsh & Co., Inc. to proceed in accordance with your interpretation of the specifications, we would have to import additional gravel. The importation of additional gravel at this late date is impossible because of the freeze-up of the Kuskaquim [sic] River. It now follows that the Project must be shut down for the winter."
Walsh was not able to import the additional base material until the following summer when the Kuskokwim River finally thawed. The processing of this material was then interrupted a number of times because of equipment failure and the contractor did not seek final inspection and approval of the work until early September, 1973. The final inspection, however, revealed that the average thickness of the wood chip layer underlying the crushed surface was only nine inches, whereas the specifications required a wood chip layer twelve inches thick, and the gravel layer had an average thickness of 14.6 inches.
On May 1, 1974, Walsh filed suit against ASHA seeking recovery of added expenses it allegedly incurred by reason of the controversy over the Platinum material. In addition, Walsh sought recovery of approximately $138,000.00, that portion of the contract price which had not been paid. ASHA responded by denying liability for these damages and by filing a counterclaim against Walsh for recovery of "an amount in excess of $100,000.00" in damages, allegedly incurred by reason of the "deficiency" of the contractor's performance.
At the conclusion of trial, the court found that Walsh had substantially performed its obligations under the contract, and, therefore, was entitled to the remainder of the contract price. In addition, the court found § 2.4 of the Technical Specifications did not clearly require the crushed surfacing to be one hundred per cent manufactured, but rather it was ambiguous on that point. Relying on past decisions of this court,[2] the trial judge construed the provision against ASHA, the drafter of the contract, and held that Walsh was entitled to $607,716.23 in added costs incurred when ASHA "modified" the agreement to require Crushed Surfacing Type A to be one hundred per cent mechanically crushed. Consistent with this, the court also denied ASHA's claim for $27,100.00 in liquidated damages. The court further found, however, that ASHA was entitled to set-offs totalling $106,793.59 as a result of deficiencies in the contractor's performance and indicated that an additional $53,260.00 would be added to that sum in the event that ASHA did not accept an offer by Walsh to replace two thousand cubic yards of gravel.
Pursuant to Rule 82, Alaska R.Civ.P.,[3] Walsh moved for an additional award of *835 $73,023.41 in attorney's fees, an amount based on the total of the basic award, $585,853.79, and prejudgment interest, $136,699.59. The trial court, however, refused to include the amount of prejudgment interest in computing the basic attorney's fees award, and therefore determined that the standard award would be $59,435.00. Finding that this amount "may be excessive," the court then reduced the award to $45,000.00. The appeal and cross-appeal to this court followed.

I
ASHA asserts that the trial court erred in its application of the doctrine of substantial performance to this case in various respects: that the court erroneously placed the burden of proof upon the owner rather than the contractor, that it was error to find substantial performance, and that the court applied an incorrect measure of damages for the defective performance.
As we noted in Hopkins Construction Co. v. Reliance Insurance Co., 475 P.2d 223, 224-25 (Alaska 1970), the doctrine of substantial performance permits recovery by a contractor who has substantially, though imperfectly, performed his contractual undertaking. In such circumstances the contractor is entitled to recover the contract price, less the reasonable costs of remedying the defects in the work or materials. The initial burden of proving substantial performance is on the contractor. If his evidence shows substantial performance, the burden is then upon the owner to prove that certain deficiencies in the work require a recoupment or set-off.[4] As it applies here, the burden should be on ASHA to establish any set-off for deficiencies in performance of the work. Substantial performance is determined by considering such factors as the character of the performance that was promised, the purpose that the contract was meant to serve, and the extent to which any nonperformance by the contractor has defeated the purposes or ends which were meant to be achieved. Nordin Construction Company v. City of Nome, 489 P.2d 455, 458-59 (Alaska 1971); 3A Corbin, Contracts § 704 at 318-19 (1960). This means that in many cases substantial performance becomes a matter of degree, to be determined by weighing a number of factors together.
In the case at bar the trial court stated:
"In reaching the conclusion that Walsh did substantially perform its obligations I especially considered the extent of Walsh's performance, the lack of any willful noncompliance with the technical specifications, and the fact that the roadway as constructed has not required any inordinate or special maintenance by ASHA."
ASHA argues that the trial court incorrectly placed the burden on ASHA to "establish less than substantial performance by Walsh."[5] The overall tenor of the trial court's decision, however, convinces us that the court's determination that the contract was substantially performed did not result from a misallocation of the burden of proof. Thus, as to this point, we find no error.
The court held that ASHA could not recover on its counterclaim for $696,860 to replace 2,000 feet of roadway. It also held that ASHA had failed to establish "less than substantial performance by Walsh of *836 its contractual obligations." ASHA complains that the court erroneously placed on it the burden of proving "less than substantial performance" by Walsh, and that by so doing the court reversed the primary burden of proof in its analysis of the facts.
A careful reading of the trial court's written decision reveals that ASHA is wresting the court's words out of context and ignoring the balance of what the court plainly decided. The court affirmatively determined that Walsh had substantially performed. It separately determined that ASHA had not shown "less than substantial performance" by Walsh. The court was there responding to ASHA's contention that it should recover on its counterclaim because Walsh failed to perform as to 2,000 feet of roadway.
In our view the trial court properly perceived the problem of allocating the burden of proof, and it did not misapply the law. The burden of proof was not improperly cast upon ASHA.
We now address ASHA's contention that the trial court erred in finding that there was substantial performance by Walsh. ASHA's argument is that the departures from the contract specifications were so grave that the owner was deprived of what it bargained for in that the road it received in its entirety averaged only 75% of the specified insulation depth, with a 2,000 foot section averaging only 40% of the design insulation depth.
However, the court had before it evidence that the road was substantially serving its intended purpose and did not require rebuilding. The evidence on this point consisted of both oral testimony and documentary evidence, from which inferences could be drawn both for and against a finding that Walsh had substantially performed. We will not disturb the trial court's findings unless we are convinced that they are clearly erroneous.[6] We are not so convinced on the record here. We conclude that the trial court did not err in deciding that substantial performance had been rendered.
We do agree with ASHA, however, that the court, after it found that there was substantial performance, applied an improper measure of damages for deficiencies in the work. An inspection of the road after its completion disclosed that it did not comply with the design specification requiring a 12-inch layer of wood chips under the road for purposes of insulation. Instead, the wood chip layer over the entire project was found to average 9 inches, with a 2,000 foot section averaging only 5 inches. ASHA presented evidence that the insufficient layer of wood chip insulation caused increased rutting along the road, necessitating frequent maintenance. The court compensated ASHA for the deficiency of performance by awarding it $65,250, the value of the wood chips which had been omitted. ASHA objects that this figure does not take into account the entire cost of remedying the defect which necessarily includes the additional labor and reconstruction expenses involved in placing the wood chips underneath the surface.
In cases of substantial performance, recoupment for defects in construction should be measured either by the cost of correcting the deficiency or, if this would involve unreasonable economic waste, the difference in value between the project as contracted for and as received. Nordin Construction Co. v. City of Nome, 489 P.2d 455 (Alaska 1971); Hopkins Construction Co. v. Reliance Insurance Co., 475 P.2d 223 (Alaska 1970); Annot., 76 A.L.R.2d 805 (1961). ASHA estimates that it will cost $696,860 to bring the most deficient portion of the road into compliance with the contract. The court was not compelled to accept this estimate and could have properly *837 found that the cost involved in rebuilding the road would constitute economic waste, but it could not merely award the value of the omitted materials as a proper alternative measure of damages.
The aim in assessing damages for deficiencies in performance should be to put the injured party in substantially as good a position as performance in accordance with the contract. The law recognizes, however, that sometimes actual reconstruction in compliance with the plans and specifications of the contract may be possible only at a cost that would be imprudent and unreasonable. Restatement of Contracts § 46, comment b at 574 (1932); A. Corbin, Contracts § 1089, at 486-87 (1964). In such cases, the court should consider alternative measures of recoupment which will substantially compensate the injured party for the deficiency in a less economically wasteful manner. For example, it may be possible to remedy the defect in the construction without having to tear down and rebuild. Although controverted, evidence was presented that the road as constructed by Walsh could be brought up to design function without rebuilding by placing crushed gravel over the under-insulated areas of the road. If so, the cost of repairing the defect in this manner could provide the appropriate measure of damages. Alternatively, recovery could be measured by the reasonable maintenance costs for foreseeable additional repair made necessary by the wood chip shortage.[7] If, in the last analysis, the court is convinced that the defect cannot be remedied without economic waste, it must award ASHA the diminished value of the road due to the defect.
Since it is apparent from the court's award of the bare cost of the omitted wood chips that it did not apply the proper measure of damages, we remand to the superior court for a redetermination of the amount of recoupment owed to ASHA as a result of the wood chip deficiency. If necessary, additional evidence may be taken on remand.

II
ASHA next contends that the superior court erred in its interpretation of the contract in regard to what gravel surfacing material was required. Section 2.4 of the Technical Specifications of the contract provided:
"2.4 Crushed Surfacing, Type A shall contain no muck, frozen material, roots, sod or other deleterious matter. It shall have the following grading as determined by Alaska Method T-7.


                               Grading, %
 Sieve Designation          Passing by Weight
          2"                    100%
         No. 4                   30-70%
         No. 200                  3-10%

At least 50% of the particles retained on the No. 4 sieve shall have at least two fractured faces."
Additionally, a soils report was included as part of the bound volume in which the specifications appeared. This report was written by an engineer who had considered what should be done to rehabilitate the Bethel road, and set forth various possibilities. In one place the report spoke of a design of the roadway whereby crushed rock would be laid over a layer of wood chips. It stated:
"6. Wood chips and gravel. The road would be built over 12" of dry wood chips. The wearing surface should preferably be constructed of rock, although it would also be possible to place 6 inches of clean gravel below 6 inches of crushed rock. One foot thick, crushed rock wearing *838 surface should also be considered a minimum... ."
ASHA asserted in the superior court that the soils report should be considered to be part of the specifications. The court found that what was meant by "Crushed Surfacing, Type A" was ambiguous. It received a considerable amount of evidence, including oral testimony on this question. The court concluded that the soils report was included in the contract documents for information only. It resolved the contract ambiguity in favor of Walsh, i.e., it held that not all the material had to be manufactured, and that as long as 50% of the particles retained on a No. 4 sieve had two or more fractured faces the material would have complied with the specification.
We need not discuss in detail the evidence that was before the court on this question. We agree with the superior court that an ambiguity existed. The court's findings and conclusions are not clearly erroneous, and we will not disturb them on appeal.
ASHA also contends that the trial court erred by awarding damages to Walsh for the added costs the contractor incurred by reason of the delay in the completion of the project. As we have noted above, the court found that the delay was directly caused by the ambiguity in the contract relating to the specifications of "Crushed Surfacing, Type A," and hence applied the doctrine of contra proferentem to hold that ASHA, as drafter of the contract, was responsible for the resulting additional costs to the contractor. ASHA appeals this ruling on the alternative grounds that there was no such ambiguity in the contract and that, even if there was, it was not the effective cause of delay in the completion of the project. We shall address each of these contentions in order.
First, ASHA urges that § 2.4 of the Technical Specifications unambiguously requires the material used to be mechanically crushed and, therefore, Walsh erred by attempting to incorporate material that satisfied only the requirements of Alaska Method T-7. Judging this specification on its face alone, we are unable to agree with this contention. The purpose of any technical specification is, of course, to provide specifics, and § 2.4 requires only that the material must have certain size or grade characteristics with at least 50% of the particles retained on the No. 4 screen having two or more fractured faces. The specification contains no requirement that any other grade of particles in the material have any facet requirements. Nor does the title of the section, "Crushed Surfacing, Type A," suggest that the material must be mechanically crushed, at least on the basis of a lay interpretation, since rock may be crushed by natural processes as well, such as by glaciation or traumatic weathering. ASHA argues, however, that "Crushed Surfacing" is a term of art within the construction industry, understood to mean "mechanically crushed surfacing." Conflicting testimony on this point was offered at trial, however, and on the basis of the record, we are unable to find that the resolution of this issue by the trial court was clearly erroneous.
ASHA also argues that, regardless of any such ambiguity, the dispute over the Platinum material and subsequent delay were caused in fact by a breach of contract by Walsh in failing to provide ASHA's architect with samples of the Platinum material as requested at the August 21, 1972, pre-construction conference. In support of this argument, ASHA points to § 17(d) of the General Conditions of the contract which states in part: "[The Contractor] shall ... submit for approval as required full information concerning the materials or articles which he proposes to incorporate in the work." (emphasis added). Walsh responds to this by citing subsequent § 18(a) of the General Conditions which sets forth specifically what samples are required to be submitted by the contractor for approval. The section reads in relevant part:

*839 "The Contractor shall timely furnish to the Architect for approval all samples (and certificates related to them) as stipulated under the several divisions of the Technical Specifications." (emphasis added).
None of the Technical Specifications in the contract requires the contractor to submit for approval samples of "Crushed Surfacing, Type A." Walsh argues, therefore, that it had no contractual duty to furnish such a sample to ASHA. We agree that the technical specifications did not require such submittal.
Finally, ASHA claims that, even if Walsh had initially procured proper raw materials and processed them as intended by the ASHA architect, the contractor did not allow sufficient time before winter freeze-up to complete the processing. In support of this argument, ASHA points to the time it took for Walsh to process the acceptable raw material that was brought in after the Platinum material was rejected. Although the argument is ingenious, it entails speculation to a degree which we are unwilling to rely upon.
Moreover, there is evidence in the record to indicate that the Platinum material required less processing than the material that was eventually substituted for it in order to conform to the strict requirements of Alaska Method T-7. As such, the processing of the Platinum material would have taken less time. As noted above, Walsh was entitled to rely on the Platinum material under the express terms of the contract. Thus it cannot be said that the contractor was at fault, if indeed the processing time was under-estimated. For the foregoing reasons, we are unpersuaded by ASHA's argument. We hold that the superior court's resolution of this question was correct.
Similarly, we affirm the superior court's disallowance of liquidated damages for completion of the project beyond the contract deadlines, for the delay was caused by ASHA's demands that work be done which was beyond the original contract terms.
In view of our disposition, we need not address the question of attorney's fees raised by Walsh.
After remand, the judgment should be altered to allow attorney's fees based on the eventual award, including prejudgment interest.
NOTES
[*]  This case was submitted to the court for decision prior to Justice Boochever's resignation.
[1]  The road system covered by this contract was originally constructed in 1968 of sand, laid upon an "active" layer of tundra. An "active" layer of tundra freezes in winter and thaws in the summer. Below it rests inactive permafrost, i.e., a permanently frozen layer of soil or rock. Disturbance of the vegetative mat of the tundra can result in increasing the depth of the "active" layer, and for this reason ordinary road designs may fail when constructed on permafrost terrain. That was the case here. The project at issue was intended to rehabilitate the earlier road system which had failed.
[2]  See Hahn v. Alaska Title Guaranty Co., 557 P.2d 143, 144 (Alaska 1976); University of Alaska v. Modern Construction Inc., 522 P.2d 1132, 1138 n. 20 (Alaska 1974); Pepsi Cola Bottling Co. v. New Hampshire Insurance Co., 407 P.2d 1009, 1013 (Alaska 1965); Lumbermens Mutual Casualty Co. v. Continental Casualty Co., 387 P.2d 104, 108-09 (Alaska 1963).
[3]  Alaska Rule of Civil Procedure 82 states in pertinent part:

"Attorney's Fees.
(a) Allowance to Prevailing Party as Costs.
(1) Unless the court, in its discretion, otherwise, directs, the following schedule of attorney's fees will be adhered to in fixing such fees for the party recovering any money judgment therein, as part of the costs of the action allowed by law:
ATTORNEY'S FEES IN AVERAGE CASES


                     Without    Non-
          Contested   Trial   Contested
First  $2,000   25%    20%      15%
Next   $3,000   20%    15%      12.5%
Next   $5,000   15%    12.5%    10%
Over   $10,000  10%     7.5%    5%

Should no recovery be had, attorney's fees for the prevailing party may be fixed by the court as a part of the costs of the action, in its discretion, in a reasonable amount.
(2) In actions where the money judgment is not an accurate criteria for determining the fee to be allowed to the prevailing side, the court shall award a fee commensurate with the amount and value of legal services rendered.
(3) The allowance of attorney's fees by the court in conformance with the foregoing schedule is not to be construed as fixing the fees between attorney and client."
[4]  How these basic rules should be administered will vary somewhat depending on the factual context. For example, where a contractor concedes that the work is incomplete or contains deficiencies, it may be most fair to require him to establish the amount to be deducted, which the owner may then contest.
[5]  The trial court's written decision states:

"In addition, the burden is on the promisee to establish the fact of less than substantial performance as well as to establish his right of recoupment... . After carefully considering all of the evidence, I find that ASHA has not met its burden in establishing less than substantial performance by Walsh of its contractual obligations."
[6]  Alaska Foods, Inc. v. American Manufacturer's Mutual Ins. Co., 482 P.2d 842, 847-48 (Alaska 1971); Jackson v. White, 556 P.2d 530, 533 (Alaska 1976).
[7]  ASHA's expert witness estimated that maintenance costs over the life of the road would amount to over a million dollars. It is not clear, however, whether this estimate is limited to the additional maintenance costs due to the defect. Since a certain amount of maintenance would be necessary even to a design functioning road, this amount should not be included in the calculation of damages.
