It was error to sustain a demurrer to a bill in equity on the basis of new matter alleged in the demurrer but not set forth in the bill. 
In an agreement between the plaintiff in a suit in equity, a construction company which for many years had been doing excavation work for a gas company in three counties in which the gas company had its customers, and the defendants, a corporation and an individual frequently employed in excavation work by the plaintiff, a covenant by the defendants not to compete with the plaintiff in such counties by work, employment or contract "with any person or firm for whom the plaintiff had worked, or with whom the plaintiff had contracted," for a certain period of three years was reasonable and valid, and the plaintiff was entitled to damages from the defendants by reason of excavation work done by them for the gas company during such period pursuant to a contract made by them directly with it. 
BILL IN EQUITY filed in the Superior Court on September 8, 1966.
The plaintiff appealed from an interlocutory decree and a final decree entered by Mitchell, J., with respect to the defendant C. Franklin Corporation, and from a final decree entered by Spring, J., with respect to the defendant Charles H. Franklin, Jr.
Donald J. Fleming for the plaintiff.
Edward J. Harrington, Jr., for the defendants.
REARDON, J. The plaintiff, a construction company, alleges in its bill that on or about June 8, 1963, it entered into a written agreement with the defendant corporation (corporation) and the defendant Charles H. Franklin, Jr. (Franklin) as an individual under the terms of which the defendants, whom it had hired to do certain excavation work in New Bedford "and particularly for the New Bedford was and Edison Light Company of New Bedford"
(Gas Company), agreed not to compete with the plaintiff in Bristol, Plymouth and Barnstable counties by work, employment or contract "with any person or firm for whom the plaintiff had worked, or with whom the plaintiff had contracted," without written approval from the plaintiff. This undertaking on its terms was to be effective for three years after the termination on notice of other contractual undertakings between the parties and in no event beyond June 7, 1968. The bill alleges violation of the agreement and seeks an injunction and damages. The plaintiff appeals from an interlocutory decree sustaining a demurrer of the corporation as to paragraph 3 only, from a final decree dismissing the bill as to the corporation, and from a later final decree dismissing the bill as to Franklin. The trial judge made findings and the evidence is reported. We refer to the judge's findings.
The plaintiff had done excavation work for the Gas Company for some twenty years, and in 1960 contracted with the corporation for the excavation of trenches on a fairly regular basis as a subcontractor. Franklin at times personally did this work as well as supervising it. In May of 1963 the corporation "did certain work for the Gas Company which was similar to the type of work . . . [the corporation] had been doing for the plaintiff." This came to the attention of the plaintiff and, following discussions, the plaintiff and the defendants entered into the contract containing the restrictive covenant. This contract was executed in the presence of counsel for the defendants by the plaintiff and by Franklin signing as an individual and also as an agent of the corporation. Thereafter, by subsequent agreements, the corporation continued to do work for the plaintiff through June 30, 1966. While the corporation did not work directly for the Gas Company from the date of the agreement, June 8, 1963, through June 30, 1966, the defendants did in June of 1966 submit a bid on invitation by the Gas Company for new work of the same type which the corporation had been performing for the plaintiff. The contract for this work was awarded to the corporation and
it commenced work under this contract on July 1, 1966, continuing to the date of the trial of the suit. The judge found that the defendants had violated the prohibitions of the agreement. He ruled that the restriction "in no way has stifled competition, created a monopoly or caused prices to rise," and that the restraints relative to the three counties were reasonable in that they applied only "to those customers of the plaintiff in those counties with whom the . . . [corporation] had dealings as the plaintiff's subcontractor," but that the restriction with regard to time was unreasonable and that a year's time would be reasonable. He also ruled that the damages provided in the contract for breach of the restrictive covenant constituted a penalty.
1. We first consider the plaintiff's allegation of error concerning the interlocutory decree sustaining the demurrer of the corporation as to paragraph 3 only. The demurrer asserts illegality of the contract on the ground that it was unlawful for the plaintiff to prohibit the corporation from dealing with a public utility in such fashion as possibly to inhibit the establishment of the lowest possible rates for the public. This constituted the allegation of new matters not a proper subject for demurrer "which lies only to what appears on the face of the bill." Rosenthal v. Maletz, 322 Mass. 586 , 588-589. Homer v. Abbe, 16 Gray 543 , 545. Davenport v. Danvers, 332 Mass. 580 , 582. Facts not alleged in the bill, if relied upon in defence, must be set forth by way of plea or answer. It was error to sustain the demurrer.
2. We next consider the nature of the agreement, the motives which impelled its execution, and the question of whether and to what extent it was binding. It is evident that for many years the plaintiff had engaged in excavation work for the Gas Company. The inescapable inference from what is before us is that the defendants were anxious to secure for themselves the work in which, following execution of the agreement, they subsequently engaged. There was no compulsion upon them to enter into it had they not so desired. They were guided by counsel, and the agreement
containing the covenant which they later disparaged was one to which they freely bound themselves. The record is barren of anything suggesting compulsion on the part of the plaintiff. Our law is clear that a covenant restraining competition, inserted in an agreement such as that before us, "is not in itself invalid if the interest to be protected is consonant with public policy and if the restraint is limited reasonably in time and space." Becker College of Business Admn. & Secretarial Science v. Gross, 281 Mass. 355 , 358. The facts determine the reasonableness of the restriction. The Gas Company had customers in the three counties to which the agreement referred. We do not consider the restriction on space to have been too restrictive in the light of that fact. See Metropolitan Ice Co. v. Ducas, 291 Mass. 403 , 405, and cases cited; New England Tree Expert Co. Inc. v. Russell, 306 Mass. 504 , 508. Nor was the term of three years which the contract provided too long a time on the facts here to impose a restriction. Bonneau v. Meaney, 343 Mass. 368 , 371, and cases and texts cited therein. The defendants' free choice to bind themselves to that period is not offset by the invitation by the Gas Company for open bids. Their participation in the bidding is an element favoring the restriction rather than otherwise and was an event which they reasonably might have foreseen when they bound themselves.
3. It appears that by stipulation in open court the parties agreed, and the court acceded to the agreement, that if damages were to be assessed for breach of the contract they would be set at $100 a day for each day in which such breach occurred. We are of opinion that that stipulation was sufficient for the assessment of damages.
4. The decrees are reversed. If the parties fail to agree on the total sum of damages within thirty days from the date of rescript the case is remanded to the Superior Court for assessment of damages in favor of the plaintiff conformable to the stipulation of the parties and in accordance with the foregoing.