The plaintiff appeals from a judgment that a promissory note for an architect’s fee in excess of that set out in a Federal Housing Administration (FHA) form (a so called "FHA Owner-Architect Agreement”) is unenforceable. The defendant appeals from a judgment dismissing its counterclaim for $21,480 in alleged overpayments to the architect. Under a contract signed in 1967 the plaintiff was to perform architectural services for Braemoor Nursing Home, Inc., for a fee of ten per cent of the construction cost, or approximately $120,000. In *897order to obtain FHA-insured financing, in 1969 the owner and the architect entered into a new agreement, the FHA Owner-Architect Agreement, which provided for a "total fee of $70,000.” On the same day the owner signed the promissory note to the architect for $24,000. 1. The plaintiffs argument that the note was additional compensation owed for architectural services rendered fails, as the FHA Owner-Architect Agreement by its terms was intended to be the entire contract and to supersede the 1967 contract. Where there is no ambiguity in a written contract, its interpretation is a matter of law. Quintin Vesper Co., Inc. v. Construction Serv. Co., 343 Mass. 547, 551 (1962). Robert Industries, Inc. v. Spence, 362 Mass. 751, 755 (1973). St. Germain & Son, Inc. v. Taunton Redevelopment Authy., 4 Mass. App. Ct. 46, 51 (1976). The FHA Owner-Architect Agreement provides that the services being recompensed include "all services already performed” and that its provisions "supercede and void all inconsistent provisions of any prior contract.” Thus, this agreement was substituted for the prior contract and operated as a discharge of it. See Tuttle v. Metz, 229 Mass. 272, 275 (1918); Adams v. Herbert, 345 Mass. 588, 590 (1963). 6 Corbin, Contracts § 1293 (1962). Not only does the agreement state in clear and unambiguous terms (1) that it was intended to be the entire agreement, (2) that the $70,000 fee was to be the "total fee,” and (3) that it covered all services already performed as well as those yet to be performed, but also in paragraph 17 the architect certified that he had no financial interest in the nursing home other than the $70,-000 fee. "[W]here a writing shows on its face that it includes the whole agreement of the parties ..., it is presumed that they have placed the terms of their bargain in this form to prevent misunderstanding and dispute, intending it to be a complete and final statement of the whole transaction.” Glackin v. Bennett, 226 Mass. 316, 319-320 (1917). Further, where the terms of such a contract are unambiguous, previous and contemporaneous oral agreements and written memoranda cannot be used to contradict or modify those terms. Goldenberg v. Taglino, 218 Mass. 357, 359 (1914). Robert Industries, Inc. v. Spence, 362 Mass. at 754. See Restatement (Second) of Contracts §§ 239,241 (Tent. Draft No. 6,1971). Therefore, it cannot be shown that the note was compensation for architectural services in excess of $70,000. See also Farquhar v. Farquhar, 194 Mass. 400, 405 (1907), in which a written contract for sale of a business at a fixed sum was not allowed to be contradicted by proof of an agreement to sell for another sum. 2. The plaintiffs contention that the note was consideration for his execution of the agreement also fails for the same reasons, as such an interpretation is inconsistent with the terms of that agreement. See Restatement (Second) of Contracts, supra. The note is thus unenforceable for lack of consideration. 3. Deciding as we do, we do not reach the question whether the note, which was entered into to circumvent the fee limitation imposed by the FHA as a condition for its consent to insure the loan (see 12 U.S.C. § 1715w [1964 & Supp. IV 1968]), is unenforceable on the grounds of illegality and public policy. See 18 U.S.C. § 1010 (1970). But see Teletransmissions, Inc. v. David, 5 Mass. App. Ct. 864, 865 (1977) (Brown, J., concurring). 4. The defendant is entitled to its counterclaim for the amount paid above the allowable fee. The allowable fee is to be determined in accordance with paragraphs 1 and 11 of the FHA Owner-Architect Agreement. The judgment for the defendant on the plaintiffs original claim is affirmed. The judgment *898dismissing the counterclaim is reversed, and a new judgment is to be entered in an amount determined in accordance with this opinion.-
John T. Snow for the plaintiff. F. Anthony Mooney (Neil Jacobs with him) for the defendant.So ordered.