In an action to recover under a written contract for engineering services, there was no error in the allowance of the plaintiff's motion for summary judgment where the complaint, motion for summary judgment, and accompanying affidavit stated all facts necessary to resolve the dispute and the only contested issues related to interpretation of the contract. [340-341]
In an action for breach of a written contract by which the defendant engaged the engineering services of the plaintiff, the plaintiff was entitled to pursue its remedies on the contract rather than in quantum meruit where it had fully performed its obligations under the contract. 
Where the contract engaging the engineering services of the plaintiff to design and oversee a construction project failed to set forth expressly what compensation the plaintiff should receive in the event of partial termination of the construction project, this court would supply a term reasonable in the circumstances. [341-342]
Where a contract engaging the engineering services of the plaintiff to design and oversee a construction project failed to set forth what compensation the plaintiff should receive in the event of partial termination of the construction project but provided that, in the event of complete termination of the project after the design phase
had been completed, the plaintiff would be entitled to 85% of its fee computed on the basis of an estimated cost of construction, that provision was applied upon partial termination of the project, but the actual cost bid on the project, including the cancelled work, was substituted for "the estimated cost of construction." [342-344]
CIVIL ACTION commenced in the Superior Court on May 4, 1976.
A motion for summary judgment was heard by Linscott, J.
Douglas B. MacDonald (George W. Stuart with him) for the defendant.
John M. Reed for the plaintiff.
KASS, J. Massachusetts Port Authority (Massport) entered into a written contract engaging the engineering services of Fay, Spofford & Thorndike, Inc. (FST), to design improvements for a runway at Logan Airport. After FST completed the design work and, indeed, after bids had been received from contractors, Massport reduced the scope of the work substantially. The parties ask us to resolve the manner in which Massport should compensate FST for designing that portion of the work which Massport decided not to build.
Procedurally, the case comes to us on Massport's appeal from the entry of a judgment based on allowance of FST's motion for summary judgment under Mass.R.Civ.P. 56, 365 Mass. 824 (1974). We draw the facts of the case from FST's complaint, which sought a declaratory judgment, and FST's affidavit in support of its motion for summary judgment.
The parties entered into a contract drawn by Massport and submitted to FST, which signed it on February 14, 1974. The agreement was countersigned on behalf of Massport on March 8, 1974. FST had earlier outlined the fundamental business terms of the contract in a written response to a request for a proposal from Massport. The contract outlines the scope of the project and the engineer's responsibility in general terms and then provides that FST is to perform its services in two phases, the
design stage and the construction stage. The design stage is subdivided into eleven subcategories including preliminary designs and estimates, preparation of long lead construction materials, and preparation of detailed working drawings and specifications "suitable for advertising for bids and award of construction contract," preparation of a final cost estimate, and assistance in the award of a construction contract. Under the caption heading of "Design Stage" are two subparagraphs, (j) and (k), which impose on FST the obligation of checking shop drawings of the contractor and subcontractors, consultation and advice during construction, and checking and certifying the "As-Built" drawings of the contractor at the completion of construction. By their nature these duties would, in fact, be performed after the project had been designed and during the time it was under construction. The second, or construction, stage deals with providing the services of a full-time resident engineer and assistants to supervise construction. Other than that, the subparagraphs of the section purporting to define the scope of construction stage services speak more of warranties of the professional competence of FST's performance, rather than of the nature of services during the construction stage.
Section 3 of the contract gets to the heart of the matter: the terms and method of payment. Paragraph A provides for a fee to FST based on "a percentage of the Project Construction Cost determined in accordance with and shown on the B Curve contained in the ASCE [American Society of Civil Engineers] Manual No. 45 dated 1972 . . . less 0.4 percent. Said percentage shall then be applied to the total contract price as provided in the construction contract." Paragraph B of section 3 of the contract provides that Massport shall pay for services rendered under the design phase "periodically as the work progresses; provided, however, that the Owner shall retain fifteen (15%) percent which shall be due and payable upon completion of the construction and all services provided for herein."
Section 7 of the contract deals with termination. It gives Massport the right to terminate the agreement with FST at any time, with or without cause. If Massport terminates prior to completion of items (a) through (h) of the design stage, "then the Engineer's entire fee for services rendered hereunder shall be computed, notwithstanding the provisions of Paragraph 3 herein," on the basis of a multiple of payroll.
Items (a) through (h) of the design stage work had been completed by FST and, therefore, to the extent that section 7 dealt with partial termination, subparagraph B applied. The terms of this paragraph were that if "Owner terminates . . . subsequent to the design stage, then the Owner and the Engineer shall agree in writing upon an estimated construction cost of the Project. The Engineer's fee shall then be computed so as to equal 85% of the fee provided for in section 3A hereof." There has been no express agreement between the parties as to what constituted the "estimated construction cost of the project" under section 7B.
In connection with its design stage work, FST estimated the cost of the project at $3,195,225. On the basis of this estimate, Massport advertised for bids on the runway improvements job. The lowest of the qualified bids received was for $2,941,717, actually less than the FST estimate. After the bids were opened, Massport for reasons of policy unrelated to FST's work or to the cost estimates decided to delete a major component of the runway improvements. At Massport's request, FST prepared forms for the successful contractor to sign which reduced the scope of the work from the $2,941,717 bid figure to a $1,761,002 contract figure. Massport entered into a construction contract in the amount of the lower figure with the successful bidder, M. DeMatteo Construction Co.
FST claims a design fee based on the job as designed, without reduction in scope, and urges that the DeMatteo bid of $2,941,717 be treated as the construction cost or estimated construction cost of the project for purposes of
the contract. Massport takes the position that the design stage fee is payable on the basis of the construction contract price, i.e., the contract as let for the diminished job, and that FST's entitlement to compensation for designing that portion of the job which was cancelled should be calculated on a quantum meruit basis.
1. Although it filed no counter affidavit to FST's affidavit in support of the motion for summary judgment, Massport argues that there were, nonetheless, genuine issues of material fact which should have defeated the motion for summary judgment. First, Massport contends FST's complaint and affidavit failed to advance a single consistent theory of interpretation of the payment provisions under the employment contract. This is not, however, an issue of fact. The full text of the agreement, as well as underlying papers which FST claimed to be material, was appended to the complaint or affidavit, and in some instances to both. What FST had to say about interpretation of that document was argument and not fact. Similarly, the motion for summary judgment and supporting affidavit did not need, as Massport suggests, to lay an express foundation for treating the DeMatteo bid price as the basis for pricing FST's services. This again involved interpretation of the contract and not a contested issue of fact. Finally, Massport suggests that the supporting affidavit failed to set forth that FST completed work under the design stage. The supporting affidavit, however, did expressly state that FST completed all work which would have been done prior to the commencement of construction. As we have noted, subparagraphs (j) and (k) of the section of the contract captioned "Design Stage" covered work which, by its nature, would be done during construction, not before, e.g., "checking shop drawings, consultation and advice during construction" (emphasis supplied). We think that the complaint, motion for summary judgment, and accompanying affidavit, which Massport left unrebutted, stated all facts necessary to resolve the dispute. If Massport had specific
facts to allege establishing that there was a triable issue, it was its obligation so to do by counter affidavit. Mass.R.Civ.P. 56(e), 365 Mass. 825 (1974). Community Natl. Bank v. Dawes, 369 Mass. 550 , 554 (1976).
2. Massport argues that since the contract failed to come to grips expressly with the contingency of partial termination of the work, the proper approach would be to pay FST on the basis of a contract formula for the work which was, in fact, built and to pay FST on the basis of quantum meruit for the work which was cancelled. Generally, parties may invoke the remedy of quantum meruit, that is, asking recovery for the fair value of services and materials, in the absence of a contract or where the party furnishing services and materials, finding the contract is broken by the other party, disaffirms the contract and considers it at an end. Kass v. Todd, 362 Mass. 169 , 175 (1972). 12 Williston, Contracts Section 1485 (3d ed. 1970). If the plaintiff has fully performed, the action is for damages on the contract, not on a fair value basis without regard to the contract. Green v. Boston Safe Deposit & Trust Co., 255 Mass. 519 , 523 (1926). 12 Williston, Contracts Section 1459 (3d ed. 1970). See Restatement of Contracts Section 350 (1932).
Here, of course, there is a contract and FST performed all the services which the contract required of it. There has been no breach except in Massport's obligation to pay and, under those circumstances, FST correctly pursues its remedies "on" rather than "off" the contract. See Stark v. Ralph F. Roussey & Associates, 25 Ill. App. 3d 659, 662 (1975). There is excellent reason to look to the terms of a contract, when one exists, to govern the measure of compensation. The contract provisions will disclose, as they do in the instant case, what the contracting parties thought was appropriate, thus obviating an extended inquiry into external sources of information as to what may be fair compensation.
3. We now look to the contract, which suffers the defect of not dealing expressly with what compensation FST
should receive in the event of partial termination. Where the parties to a contract have not agreed with respect to a term which is essential to a determination of their rights and duties, a term which is reasonable in the circumstances will be supplied by the court. Restatement (Second) of Contracts Section 230 (Tent. Draft No. 5, 1970). See Farnsworth, Disputes Over Omission in Contracts, 68 Colum. L. Rev. 860 (1968). In a sense, when an essential term of a contract is missing, that contract is ambiguous and it falls to us to interpret the contract sensibly in the light of the terms of the document taken as a whole, King Features Syndicate, Inc. v. Cape Cod Bdcst. Co., 317 Mass. 652 , 654 (1945); Johnson v. Worcester Business Dev. Corp., 1 Mass. App. Ct. 527 , 529 (1973), and surrounding facts (which in this case we derive from the complaint and from the affidavit in support of the motion for summary judgment). Robert Indus., Inc. v. Spence, 362 Mass. 751 , 755 (1973).
Massport focuses on a single sentence in one of the payment provisions of the contract which reads, "said percentage [referring to a percentage of the project construction cost] shall then be applied to the total contract price as provided in the construction contract [emphasis supplied]." This language, Massport's argument runs, means that, under the contract, FST can be paid for its design work only on that portion of the job incorporated in the construction contract with DeMatteo. To compute FST's fee on the bid price for the entire work, Massport urges, is to rewrite the contract. We do not think making sense of the contract is tantamount to rewriting it. Rather we follow the principle that a literal interpretation of a word or phrase may be qualified by the context in which it appears, by the general purpose manifested by the entire contract, and by circumstances existing at the time of execution. Charles I. Hosmer, Inc. v. Commonwealth, 302 Mass. 495 , 501-502 (1939). Dickson v. Riverside Iron Works, 6 Mass. App. Ct. 53 , 55 (1978). Examining the contract as a whole, the reader does not find an unvarying
measure of the cost of the project. First the contract refers to "Project Construction Cost" with initial capital letters, as if the words were a defined term, although no definition appears. It then refers to the construction contract price, as we have noted. Payment, the contract provides in a further subparagraph, "shall be made periodically as the work progresses," which means that the parties would have to base payments on some estimated construction cost in order to make periodic payments for engineering services before Massport let a construction contract. Under section 7, dealing with termination, the contract speaks of a fee based on an agreed upon estimated cost of construction. This provision introduces what we think is the determinative anomaly of Massport's position. Under its interpretation of the contract, if Massport scrubs in its entirety the job for which it has ordered plans and specifications, FST is entitled to a fee of 85% of the estimated construction cost. If the job is merely reduced in scope, FST is entitled to less. Applying Massport's approach to the figures in the record, for example, it would have paid 85% of an agreed estimated construction cost had it cancelled the job altogether. Since Massport had not found FST's construction cost estimate of $3,195,225 excessive, having invited bids on that basis, a fee would be computed as follows: 5.05% [Note 1] X $3,195,225 X 85% = $137,155. But with, as here, only part of the work deleted, the fee would be 5.35% [Note 2] X $1,761,002 [Note 3] X 85% = $80,081. We reject so unreasonable a result. So far as practicable, a contract should be given a construction which will make it a rational instrument. Berkal v. DeMatteo
Constr. Co., 327 Mass. 329 , 333 (1951). Cf. Restatement (Second) of Contracts Section 229(a) (Tent. Draft No. 5, 1970). Common sense and the probable intent of the parties are guides to a court's construction of a written instrument. Clark v. State St. Trust Co., 270 Mass. 140 , 153 (1930). Fried v. Fried, 5 Mass. App. Ct. 660 , 664 (1977).
Employing the rules of construction we have discussed, we conclude that section 7(B) of the contract, dealing with termination after FST had completed the design stage through item (h), applies to partial termination as well. Although a construction cost can be said to have been agreed to in writing by the parties by reason of FST's written submission of its construction cost estimate and Massport's subsequent invitation of contractors' bids based on that estimate, it is more rational and more fair to substitute the actual construction cost bid by DeMatteo. To fail to do so would bestow an unwarranted windfall on FST and one which FST has not, in fact, asked for.
4. The judgment entered below was correct in declaring that under the contract FST is entitled to be paid for its services on the cancelled work (described as items A through E of paragraph 1 of the contract) on the basis of the bid for the work as submitted by DeMatteo, i.e. $2,941,717. Under FST's complaint, this is the only question on which the court is required to enter a declaratory judgment. [Note 4]
[Note 1] Curve B of the controlling ASCE manual, reading the graph as best we can, prescribes a 5.45% fee for a job of this size. The parties agreed the percentage would be reduced by .4% resulting in 5.05%.
[Note 2] As the construction cost falls, the applicable percentage fee increases. Once again, we can only approximate the percentages to be read from Curve B.
[Note 3] The actual contract price after the scope of the work was reduced.
[Note 4] In calculating FST's fee, the proper percentage factor would be that which the B curve in the ASCE manual discloses for a $2,941,717 contract less .4% (see note 1, supra) and that percentage would be applied to the completed and cancelled components of the job. As to the cancelled part there would be a further multiplication by 85%. That is, FST cannot apply the higher percentages which would be applicable under the B curve to a job of $1,761,002 (the contract amount) and a job of $1,180,715 (the cost of building the cancelled part of the job).