
369 Mass. 737 (1976)
342 N.E.2d 706
TOWN PLANNING AND ENGINEERING ASSOCIATES, INC.
vs.
AMESBURY SPECIALTY CO., INC. (and a companion case[1]).
Supreme Judicial Court of Massachusetts, Essex.
December 5, 1975.
February 13, 1976.
Present: HENNESSEY, C.J., QUIRICO, KAPLAN, & WILKINS, JJ.
*738 F. Dale Vincent for Amesbury Specialty Co., Inc.
Bruce G. Daniels for Town Planning and Engineering Associates, Inc.
KAPLAN, J.
The plaintiff Town Planning and Engineering Associates, Inc., sued a client, the defendant Amesbury Specialty Co., Inc., for the alleged wrongful termination by the defendant of a contract under which the plaintiff was to prepare plans and do other engineering and related work toward the construction of an industrial building for the defendant.
In its declaration the plaintiff, in a first count, alleged the breach of a written contract between the parties dated April 16, 1969, and, in an alternative second count, claimed on an account annexed. Damages of $30,388 were demanded, figured by reference to provisions of the contract. The defendant's answer, in addition to a general denial, set out as defenses that the plaintiff had induced the defendant to enter into the contract by means of false representations; that the plaintiff's work was unsatisfactory, justifying termination; and, finally, that performance on the part of the plaintiff was illegal (and, apparently for the same reason, that the consideration for the defendant's promise failed). Besides answering, the defendant entered a cross action against the plaintiff joining also the plaintiff's principal officer, Alfred Amato. About the cross action it will be enough to say that it sought recovery of the $9,837 paid by the defendant on account under the contract; there were denials in this action and also a counterclaim duplicative of the allegations of the declaration in the main action.
A judge of the Superior Court referred the two cases to an auditor who heard evidence and rendered a report with detailed "subsidiary findings" and conclusions labeled "findings" which would call for judgment for the plaintiff *739 in the amount claimed in the main action, and judgment for the same party and for Amato in the cross action. The cases were then tried jointly to a jury upon the auditor's report and further evidence. The jury returned verdicts corresponding to the auditor's conclusions, and appropriate judgments were entered. Errors argued by the losing party were framed by motions to strike findings by the auditor and by exceptions to the judge's giving and failing to give certain instructions.
1. As the judge indicated, the main facts emerged with relative clarity. Amato was president, treasurer, and employee of the plaintiff corporation and in general charge of carrying out the particular contract. He had been a "designer" of construction for many years and apparently had considerable practical experience, but he was not a registered professional engineer, a circumstance which based the defendant's ultimate defense of illegality of performance under the contract with the plaintiff corporation.
In late 1968, Arthur P. Willette, president of the defendant corporation, called on Amato and asked for help in deciding whether a certain plot in Amesbury would be suitable for the construction of the desired building. At Willette's request the plaintiff retained Frank E. Gallagher, a registered professional engineer, who gave a negative judgment. The defendant paid the charges presented by the plaintiff. In January, 1969, attention shifted to a location in Newburyport; Willette again sought out Amato; Gallagher was again brought in, and it was finally decided to build there. The plaintiff on Willette's instruction employed a company to make test borings on the site and these were apparently analyzed for the plaintiff by Rocco A. Blasi, a registered professional engineer. Eugene J. Mulligan, a registered land surveyor, prepared a site plan, probably in February.
About this time, perhaps in March, Willette gave Amato a set of plans by Channel Building Company, Inc., marked for the defendant, delineating a pre-engineered *740 structure, that is, one to be built in substantial part by assembling prepared pieces delivered to the site. It was understood that the plaintiff would use the Channel company plans in preparing its preliminary and final plans and it did so use them.
Proceeding now with preliminary plans merging into the final, the plaintiff retained Blasi to plan the concrete work, including foundation piles, and grade beams, interior and exterior; Gallagher to plan the heating, ventilation, air conditioning, plumbing, including sprinklers, and drainage; and Frank Kent, another registered professional engineer, to plan the electrical work. Gallagher seems also to have assisted by studying plans besides his own. As indicated, these engineers were not employees of the plaintiff, rather they were independent consultants. Employees of the plaintiff  Amato and some six draftsmen, not engineers  collated and correlated these plans and the "catalogue" plans and items for the pre-engineered structure, drew up plans for interiors and many other matters not covered by the engineers' plans, and composed specifications. In bulk, indeed, the papers prepared by the employees exceeded those done by the engineers.
By late March, the work had advanced to the stage where preliminary plans could be put out for informal bidding on which costs could be estimated. After this process, the plaintiff on April 7 forwarded the table of estimated costs, totaling $499,972, to the defendant. Shortly afterward the plaintiff sent its bill for $9,837 on account of work done, which the defendant duly paid.
As the parties had understood, the preliminary plans and estimates were used with the Small Business Administration (SBA) to get assistance in obtaining a loan to finance the building and equipment. As the SBA desired to see the arrangement between the plaintiff and the defendant, a contract was executed on April 16, 1969, listing the elements of the "engineering services" to be furnished *741 by the plaintiff[2] and the terms of its compensation. (The contract memorialized a previous understanding; as noted, some of the work had already been done and part had been billed.) The SBA gave approval in early May for a loan of $500,000 for building, plus $100,000 for equipment.
In June the plans were completed and advertised for bids. Bids were opened on June 25 from the Channel company for $577,790 and LaMont Associates, Inc., for $602,207 (each excluding electrical work). The excesses over the estimate caused instant perturbation and the bids were rejected; Willette was not aware at the time that if a higher price had to be paid, it would be possible to go back to SBA and ask for approval of an increase of the loan. The following day, June 26, Willette conferred at length with Amato and gave him a go ahead to attempt to renegotiate the bids or get lower ones, and Amato busied himself in doing so and reported back to Willette. In the course of the next few days, however, the defendant through counsel terminated the contract essentially on the ground of supposed illegality.
The defendant now negotiated directly with the LaMont company which altered its bid to $484,000 for a construction (pre-engineered) lacking some of the "niceties" of the plaintiff's proposed structure. The auditor found that the LaMont building was similar to that appearing on the plaintiff's plans, and found further that LaMont used the plaintiff's plans in preparing its own, propositions (or implications) denied by LaMont.
2. The defense that the defendant's agreement was induced by false representations failed entirely. There was *742 no proof to that effect, and the auditor found, in particular, that Amato had not held himself out as an engineer, and that the plaintiff was similarly innocent of any falsity or fraud.
As to the defense that the plaintiff had not done satisfactory work, the defendant pressed this point or one analogous to it in the form of a request to charge (in effect) that it was an agreed or understood feature of the plaintiff's obligation that the building should come in for $500,000 (roughly the amount of the costs first estimated), whereas the bids were in fact substantially higher. There was no proof of such an understanding, and the auditor found that Amato was not told that the defendant wanted a building for $500,000. Cf. Kaufman v. Leard, 356 Mass. 163, 165-171 (1969).
More generally with regard to the quality of the plaintiff's work, the auditor held that it was done properly, entitling the plaintiff to payment as recommended. The trial judge left that question to the jury, and in his instructions said (on analogy to a decision of our court) that the jury might consider the failure of an individual to register as a professional engineer as some evidence, though rebuttable, that he lacked the statutory qualifications and did not intend to perform or was incapable of perfoming the duties of engineer in good faith.[3] The verdicts must be taken to clear the plaintiff of the charge of malperformance.
By its motions to strike the auditor's findings and its objections and exceptions to the judge's charge and his refusal to charge, the defendant strove to defeat enforcement of the contract on the ground of illegality. The defendant did not claim, nor could it, that the terms of the contract manifested any illegality;[4] its point rather was *743 that there was such illegality in the plaintiff's performance that the law should not aid in granting the plaintiff a recovery. Denying the motions and overruling the objections, the judge held expressly (as the auditor had indicated inferentially) that on the case as made the illegality defense failed as matter of law.
More specifically the defendant pointed to a proviso in § 81R (f) of G.L.c. 112. Section 81R (f) is one of a number of miscellaneous exceptions to the general statutory rule of § 81T that the practice of engineering, as defined,[5] is to be conducted by persons holding certificates of registration as professional engineers. Section 81R (f), as appearing in St. 1958, c. 584, § 9, excepts "the practice of engineering or land surveying in the commonwealth by a firm, co-partnership, corporation or joint stock association; provided, that the person in charge of such practice by such firm, co-partnership, corporation *744 or joint stock association is a professional engineer or land surveyor, holding a certificate of registration...." Amato, the defendant said, was "in charge" of the practice of engineering for the plaintiff, but did not hold a certificate; hence the defendant could refuse payment under the contract (and recoup its prior payments).
The plaintiff answered, first, that the proviso of § 81R (f) did not come into play because the true "engineering" practice involved in the present case was done by registered professional engineers (Gallagher and others); the rest of the work done was either non-"engineering" or engineering of a very marginal sort.[6] As the registered engineers were acting as independent contractors, separate from the plaintiff corporation, it could be said that there was no practice of engineering by the plaintiff. Alternatively, each registered engineer could be thought of as "in charge" of a segment of the plaintiff's engineering practice involved in the contract.
It is true that, with the burden on the defendant of demonstrating illegality, it made no serious effort at expert analysis and characterization of the work done by Amato and other employees of the plaintiff, as distinguished from that done by the registered engineers; the statutory definition of the "practice of engineering" (see note 5 supra) does not on its face provide a sure key to the problem. But without pushing this matter further, we are prepared to assume for purposes of the case  as the judge assumed in his instructions  that the proviso of § 81R (f) does require that a registered engineer be on hand on behalf of the corporation to combine or "orchestrate" the work of a number of independent registered *745 engineers contributing plans to accomplish a given construction job.
If there was a violation here, it was punishable as a misdemeanor under the statute.[7] Violation of the statute, aimed in part at least at enhancing public safety, should not be condoned. But we have to ask whether a consequence, beyond the one prescribed by statute, should attach, inhibiting recovery of compensation, and we agree with the judge in his negative answer to the question in the present case. To find a proper answer, all the circumstances are to be considered and evaluated: what was the nature of the subject matter of the contract; what was the extent of the illegal behavior; was that behavior a material or only an incidental part of the performance of the contract[8] (were "the characteristics which gave the plaintiff's act its value to the defendant ... the same as those which made it a violation ... of law"[9]); what was the strength of the public policy underlying the prohibition;[10] how far would effectuation of the policy be defeated by denial of an added sanction;[11] how serious or deserved would be the forfeiture suffered by the plaintiff, how gross or undeserved the defendant's *746 windfall.[12] The vector of considerations here points in the plaintiff's favor.[13]
Our cases warn against the sentimental fallacy of piling on sanctions unthinkingly once an illegality is found. As was said in Nussenbaum v. Chambers & Chambers Inc., 322 Mass. 419, 422 (1948): "Courts do not go out of their way to discover some illegal element in a contract or to impose hardship upon the parties beyond that which is necessary to uphold the policy of the law." Again the court said in Buccella v. Schuster, 340 Mass. 323, 326 (1960), where the plaintiff was allowed to recover his compensation for blasting ledge on the defendant's property although he had not given bond or secured a blasting permit as required by law: "We do not reach the conclusion that blasting without complying with the requirements ... is so repugnant to public policy that the defendant should receive a gift of the plaintiff's services."[14] Professor Corbin adds: "The statute may be clearly for protection against fraud and incompetence; but in very many cases the statute breaker is neither fraudulent nor incompetent. He may have rendered excellent service or delivered goods of the highest quality, his noncompliance with the statute seems nearly harmless, and the real defrauder seems to be the defendant who is enriching *747 himself at the plaintiff's expense. Although many courts yearn for a mechanically applicable rule, they have not made one in the present instance. Justice requires that the penalty should fit the crime; and justice and sound policy do not always require the enforcement of licensing statutes by large forfeitures going not to the state but to repudiating defendants." 6A A. Corbin, Contracts § 1512, at 713 (1962) (footnote omitted).[15]
As the facts regarding the illegality were substantially beyond dispute, it was for the judge to rule as matter of law on the consequence. See Hawes Elec. Co. v. Angell, 332 Mass. 190, 192 (1955). The case is different from Green v. Richmond, ante, 47, 52-55 (1975), where there were underlying questions of fact for the jury.
The recovery allowed here was in accordance with the terms of the express contract. In a case of illegality, serious but not so serious as to defeat the action, the plaintiff, though permitted a judgment, might be made to suffer a sanction through the reduction of his recovery to a quantum meruit less than the contract price. In the present case the defendant did not urge any such measure (although it was suggested alternatively by the second count of the declaration in the main action), nor would we think there was cause for it on these facts.[16]
Judgments affirmed.
NOTES
[1]  Amesbury Specialty Co., Inc. vs. Town Planning and Engineering Associates, Inc., and Alfred Amato.
[2]  These comprised, besides preliminary report and work with regard to test borings, the preparation of detail plans and specifications for construction, estimate of quantities and costs, assistance in securing bids, assistance in letting contracts, checking shop and working drawings furnished by contractors, consultation and advice during construction, reviewing estimates for progress and final payments to contractors, final inspection and report.
[3]  The case referred to is Commonwealth v. Monahan, 349 Mass. 139, 165-166 (1965).
[4]  Barry v. Capen, 151 Mass. 99 (1890), and Fox v. Rogers, 171 Mass. 546 (1898), could be read as suggesting that illegal performance of a contract which was legal in its terms did not bar recovery. This general proposition was protested by Williston. See 6 S. Williston, Contracts § 1761, at 4999 (rev. ed. 1938). The contrary is now settled and the problem is to discern the situations in which illegal performance should or should not affect the recovery. See Green v. Richmond, ante, 47, 51 (1975).
[5]  General Laws c. 112, § 81D, fourth paragraph, as amended through St. 1970, c. 707, § 2, provides: "`Practice of engineering', any professional service or creative work requiring engineering education, training and experience and the application of special knowledge of the mathematical, physical and engineering sciences to such professional services or creative work as consultation, investigation, evaluation, planning, design and supervision of construction for the purpose of assuring compliance with specifications and design, in connection with any public or private utilities, structures, buildings, machines, equipment, processes, works or projects, but it shall not include the practice of architecture, as defined in section sixty A, except that a registered professional engineer may do such architectural work as is incidental to his work, nor shall it include the practice of land surveying, except that a registered professional engineer qualified in the branch of civil engineering may perform land surveying incidental to his engineering work for locating or relocating any of the fixed works embraced within the practice of civil engineering excluding property line determination."
[6]  Amato said that beyond the work done by the retained engineers, "there is nothing left."

Compare the statutory exemption of the preparation of plans, specifications or shop drawings by those in the electrical, plumbing, ventilating, air conditioning, refrigeration, or other trades for work which they install. G.L.c. 112, § 81R (a).
[7]  G.L.c. 112, § 81T. There is no provision, as in the case of an unlicensed real estate broker (G.L.c. 112, § 87RR), for loss of compensation by one who unlawfully engages in engineering practice.
[8]  See Green v. Richmond, ante, 47, 51 (1975); Hawes Elec. Co. v. Angell, 332 Mass. 190, 192 (1955); Tocci v. Lembo, 325 Mass. 707, 709 (1950).
[9]  Gardner, An Inquiry into the Principles of the Law of Contracts, 46 Harv. L. Rev. 1, 37 (1932).
[10]  See Buccella v. Schuster, 340 Mass. 323, 325-326 (1960).
[11]  Note here the "backstopping" effect of G.L.c. 143, § 54A, which provides that no State or local agency charged with enforcing the State building code or laws, by-laws, or the like regarding construction of buildings shall accept or approve any plans or specifications that do not bear the seal of registration of an architect or professional engineer (with exceptions).
[12]  See the quotations from the Nussenbaum and Buccella cases appearing in the text below.
[13]  Cf. Gatti v. Highland Park Builders, Inc., 27 Cal.2d 687 (1946); Meissner v. Caravello, 4 Ill. App.2d 428 (1955); Davis v. Barrett, 115 N.W.2d 839 (Iowa 1962); Dick Weatherston's Associated Mechanical Servs., Inc. v. Minnesota Life Ins. Co., 257 Minn. 184 (1960); John E. Rosasco Creameries, Inc. v. Cohen, 276 N.Y. 274 (1937); Michael Baker, Jr., Inc. v. Chambers, 183 Pa. Super. 634 (1957).
[14]  In Hub Associates, Inc. v. Goode, 357 Mass. 449 (1970), an action resembling the present to recover for architectural services in which there was a defense of illegality, this court took the view that summary judgment was improper, saying that "forfeiture" should not be decreed on sketchy information as to the work done, and so forth.
[15]  See also Annots., 30 A.L.R. 834 (1924); 42 A.L.R. 1226 (1926); 118 A.L.R. 646 (1939); 82 A.L.R.2d 1429 (1962); 26 A.L.R.3d 1395 (1969).
[16]  We pass over objections to the judge's charge on grounds of argumentativeness and the like as not established on the record.
