These are four actions of contract, founded upon the alleged failure of each of the several defendants to perform its part of an unsealed written contract entered into on July 20,1912, between the plaintiff and the defendant in the first action, for the construction by the plaintiff of a railroad from Palmer, Massachusetts, to the Rhode Island State line at a point in Blackstone, Massachusetts. In each action the plaintiff alleges that he has constructed the roadway according to the terms of the contract in conformity with the plans and specifications furnished him, and seeks to recover payment for the work done in accordance with'the provision of the contract; which contract, among other things, provides in substance by clauses 1 and 19 that the chief engineer of the Southern New England Railroad Corporation, the defendant in the first action, shall be “sole umpire to decide all such questions, matters, and disputes,” should any misunderstanding arise between the parties “regarding any of the stipulations and provisions contained in this Contract, or the true intent and meaning thereof, or the manner of performance thereof, or of any part thereof,” including “ any arising regarding the amount and quality, character and kind of work performed and material furnished by the Contractor.”
By clause 20 the corporation agreed to pay the plaintiff the amounts set down in the schedule thereto, only upon condition that he did and performed all things to be done and performed on his part “in strict accordance with the plans and specifications and to the entire satisfaction and approval of the Engineer.”
Clause 21 provides for monthly payments as the work progressed and for final payments upon the completion of the whole work, such payments, “less any sums which under any of the provisions *490of this Contract the Corporation may be entitled to deduct therefrom, shall be made . . . upon presentation of written certificate of the Engineer showing the value of such work computed as aforesaid and stating that the work for or on account of which such certificate is granted has been duly performed and executed to his satisfaction and in accordance with the plans and specifications. The presentation of such certificate . . . shall be a condition precedent to the right of the Contractor to receive or be paid the amount so certified as due and unpaid or any part thereof, and such certificate,shall be conclusive as to the amount to be paid to the Contractor.”
Clause 23 provides in substance that such certificate shall be fina.1 and conclusive between the parties as to the measurements ' and valuations appearing therein and shall not be questioned by either party or set aside “on account of any legal defect therein or in this Contract, or on account of any informality, omission, delay or error in proceeding in or about the same or on any other ground or for any other reason, or upon any pretence, suggestion, charge, or insinuation of fraud, coercion, collusion or confederacy . . . and actual fraud only shall disqualify him [the engineer] from acting as aforesaid.”
The liability of the defendant is made conditional upon the presentation of the engineer’s certificate, which presentation is expressly made “a condition precedent to the right of the Contractor to receive or be paid the amount.” certified by the engineer. The allegation in the declarations in the several actions “that he [the plaintiff] has done and performed all acts and things which by the terms of said contract and agreement he was required to do and perform” is insufficient upon which to found a right of action. In addition thereto, it must be averred specifically that' the condition precedent was performed or the want of that performance excused. R. L. c. 173, § 6, cl. 11. Newcomb v. Brackett, 16 Mass. 161. Newton Rubber Works v. Graham, 171 Mass. 352. National Contracting Co. v. Commonwealth, 183 Mass. 89. As his reason for the non-performance of the conditions precedent, the plaintiff alleges in his several declarations that “said engineer did not act in good faith and according to his duty . . . but that he acted wilfully, capriciously, fraudulently, unreasonably and without excuse in refusing to give certificates contain*491ing the proper amounts and quantities under a proper classification as provided under the terms of said contract.”
The defendant in each action moved to strike from the several counts of the several declarations the words “wilfully,” “capriciously,” “unreasonably” and "without excuse,” each of which plainly is a characterization of the conduct of the engineer, and when proved is averred to be sufficient to excuse the non-perform-once of the condition precedent.
The defendant in each action also moved to strike out the paragraph of the several declarations commencing “And the plaintiff further says that said engineer was prevented” and ending with the words “ any other person to act in his stead.”
Also, to strike out the paragraph of the several declarations beginning with “And the plaintiff further says that the defendant has wholly failed” and ending with the words “under the terms of said contract.”
Also, to strike out the paragraph of the several declarations between the words “And the plaintiff further says that although he was at all times ready” and the words “to abandon the construction and completion of said roadway.”
Also, to strike out that part of the plaintiff’s several declarations between the words “And the plaintiff further says that the defendant has failed” and the words “as required by the terms of said contract.”'
Also, to strike out that paragraph of the several declarations which commences with the words “And the plaintiff further says that certain portions of the work” and ends with the words "under the terms of said contract.”
Each of these motions was an irregular and anomalous way of raising for decision a pure question of substantive law, which under the common law and our practice act can be determined only on demurrer or by an objection to the admission of evidence when offered in proof of the alleged facts. R. L. c. 173, §§ 14, 16, cl. 2. Montague v. Boston & Fairhaven Iron Works, 97 Mass. 502. Saco Brick Co. v. J. B. Eustis Manuf. Co. 207 Mass. 312, 315. The granting of such a motion may result in legal error; the denial thereof never can. Gardner v. Webber, 17 Pick. 407. Gately v. Taylor, 211 Mass. 60, 65. Powers v. Bergman, 197 Mass. 39. Golding v. Wharton Saltworks Co. *4921 Q. B. D. 374. Duncan v. Hargrove, 22 Ala. 150, 161. The motions were denied; and the issues raised thereby, together with certain other distinct issues raised by demurrers to the several counts of the declaration and hereinafter considered, were reported to this court under R. L. c. 173, § 105.
The questions of law attempted to be raised by the motion to strike out have been fully argued, and we therefore consider such questions on the footing of a demurrer to the allegations of fact in the declarations which the plaintiff asserts constitutes a sufficient excuse for his failure to secure the written certificates of the engineer before bringing his action. A comparison of the facts, alleged in the declaration in excuse of the non-performance of the condition precedent with the terms of the contract, limiting the right of either party to the contract to question the conclusiveness of the certificates of the engineer upon any ground other than “ actual fraud,” affords a sufficient demonstration that each of the alleged facts, if allowed to be proved, adds to the terms of the written contract a new and substantial ground or reason less than “actual fraud” for the disqualification of the engineer as quasi arbitrator.
At the trial, against the substantive rule of law that evidence is not admissible to vary the terms of a written instrument, evidence could not be received to prove facts which would change the terms of the contract. It is therefore plain that a demurrer must be sustained to the parts of the several declarations which are specifically indicated in the several motions to strike out, unless the contract itself, in so far as it relates to the conclusiveness of the certificates and to the qualifications of the engineer as arbitrator, shall be held to be void, because the engineer is an officer or agent of one of the parties to the contract or because the provisions referring disputes to the engineer as an arbitrator whose decision shall be final are broader than are permitted by the court. It would seem to be settled that the engineer or architect of one of the contracting parties legally may act as arbitrator of all disputes between the parties as to the construction of the contract or arising out of or incidental to the performance of the contract, if, in the absence of bad faith or fraud, he shall be chosen by all parties to the contract acting with knowledge of his employment, even though from the nature of the employment he may be unin*493different and biased. Palmer v. Clark, 106 Mass. 373, 389. Fox v. Hazelton, 10 Pick. 275. Strong v. Strong, 9 Cush. 560, 569. White v. Middlesex Railroad, 135 Mass. 216. Hebert v. Dewey, 191 Mass. 403, 410. Ranger v. Great Western Railway, 5 H. L. Cas. 72. Jackson v. Barry Railway, [1893] 1 Ch. 238. The cases of C. W. Hunt Co. v. Boston Elevated Railway, 199 Mass. 220 and Brocklehurst & Potter Co. v. Marsch, 225 Mass. 3, deal with the appointment of a party and are distinguishable on that ground.
The provision that the certificate to be given by the engineer “shall be final and conclusive between the parties hereto and shall not be questioned by either party, ... as to the Construction of this Contract, or as to any question of law or fact, or as to the measurements or valuations arising out of or incidental to the performance of this Contract or as to any breach thereof by either party hereto, or.as to the payment or payments to be made for any work done or material provided in the completion of the whole work contemplated by this Contract, or as to the validity or sufficiency of the information on which any certificate of the Engineer shall have been given . . .,” was agreed to between the parties to prevent disputes as to the quality of the certificate which the contractor was required to present as a condition precedent to his right to receive payment of the amount certified by the engineer. This provision is not illegal as an attempt to oust the court of its jurisdiction respecting the subject matter, because by the terms of the contract the contractor can have no right of action to which the jurisdiction of any court can attach until he shall present a certificate of the engineer unimpeachable in the absence of fraud. Lewis v. Brotherhood Accident Co. 194 Mass. 1, 4. Martinsburg & Potomac Railroad v. March, 114 U. S. 549. Chicago, Santa Fe & California Railroad v. Price, 138 U. S. 185. Nor do we think illegal the provision of the contract which provides for a reference to the engineer of all questions in dispute regarding the “amount and quality, character and kind of work performed and" material furnished by the Contractor,” as also “any of the stipulations and provisions contained in this Contract, or the true intent and meaning thereof, or the manner of performance thereof, or of any part thereof by either of the said parties,” because such determination of necessity must be made by the engineer before he can settle the *494amount due the contractor and deliver the certificate as provided in the contract. Palmer v. Clark, supra. Norcross v. Wyman, 187 Mass. 25. Old Colony Street Railway v. Brockton & Plymouth Street Railway, 218 Mass. 84. Boston Water Power Co. v. Gray, 6 Met. 131, 167. Hood v. Hartshorn, 100 Mass. 117. Audette v. L’Union St. Joseph, 178 Mass. 113. White v. Abbott, 188 Mass. 99, 102. National Contracting Co. v. Commonwealth, 183 Mass. 89. Hebert v. Dewey, supra. We are of opinion the 'allegation “that 'said engineer was prevented by the interference of the defendant from giving a certificate representing the true measurements and valuations,” imports not alone undue influence, but also that the engineer yielded to that influence. If such should be the case, such action would be a fraud and would leave the provision for obtaining the certificate of no effect. Strong v. Strong, supra. Hebert v. Dewey, 191 Mass. 403, 413.
We are of opinion the allegations, “more particularly in that he was under the absolute control and direction of the defendant, and said defendant could at any time by the terms of said contract dismiss said engineer and appoint any other person to act in his stead,” are not sufficient allegations of bias, fraud or prejudice to show collusion and fraud and are not enough to require judicial inquiry; Nichols v. Rogers, 139 Mass. 146. Nye v. Storer, 168 Mass. 53, 55. Garst v. Hall & Lyon Co. 179 Mass. 588, 590.
We are of opinion the allegation contained in the several declarations “that the defendant has wholly failed to carry out its said agreement in that extra work was required of the plaintiff under the terms of said contract, for which, according to the terms of said contract, the plaintiff is entitled to be paid; that . . . the engineer has . . . wilfully, capriciously, fraudulently, unreasonably and without excuse refused to issue certificates,” is insufficient as a statement of a cause of action, because if the right to receive payment for extra work is founded upon paragraph 73 of the specifications, it is not alleged that the work was “performed by the Contractor at the written request of the Engineer,” because it is not alleged that the work performed was a “class of work not provided for by the prices mentioned in the contract,” and because, if within the work to be done under paragraph 15 of the contract, it is not alleged that the engineer gave the con*495tractor “written orders” for the work alleged to be extra work or that there was a compliance with the provision “The Contractor and Engineer shall, before the work balled for by such order is commenced, ascertained and fix in writing signed by them respectively the precise changes as provided for . . . and the sum to be allowed therefor and to be added to the Contract price. ... In no case and on no pretense shall any charge for extras or any additional sum be claimed by the Contractor or paid by the Corporation unless the requirements of this clause shall have been strictly complied with in all respects.”
It is unnecessary to determine whether paragraphs 73 and 74 of the specifications are repugnant to paragraph 15 of the contract, as claimed by the defendant, because the plaintiff has not brought himself within either paragraph. '
We are of opinion the allegations contained in the several declarations, in substance that although the plaintiff was at all times ready to perform his part of the agreement the defendant repeatedly interrupted and suspended the progress of the work for long periods of time and prevented the plaintiff from completing the work and the construction of the roadway, and “that said interruptions and suspensions were not ordered in good faith and for any legal cause or reason within the intention of said parties, but were solely for the purpose of harassing, embarrassing and annoying the plaintiff and for the purpose of causing him great inconvenience, expense and damage by reason of said interruptions and suspensions of said work in order to induce the plaintiff to refuse to proceed with said contract and to abandon the construction and completion of said roadway,” are insufficient as a cause of action, because it is provided in paragraph 7 of . the contract; that “Notwithstanding anything in this Contract contained, the Corporation shall have the right to suspend the progress of the work or any part thereof as often and for such time as they shall see fit . . . [and] the Contractor shall not have any claim against the Corporation for any damage which the Contractor shall sustain by reason of any delay in the progress of the work arising "from such suspension or from any act or omission of the Corporation or any of its agents.” We are of opinion there is nothing contrary to public policy in an agreement of this kind which the parties have voluntarily and advisably made. The motive of the *496parties which induces them to action under a legal contract is immaterial.
- The allegations in substance in the several declarations that the defendant “has failed to carry out its part of said agreement in that it neglected and failed to cause instructions to be given by the engineer for the clearing of said right of way upon which the plaintiff was working . . . whereby the plaintiff incurred expense and damage,” is insufficient to state a cause of action. The contract nowhere provides that the defendant shall clear the right of way; and there is no allegation of the production of the engineer’s certificate or of the refusal of the defendant or engineer to clear the right of way.
The allegation in substance in the several declarations that “certain portions of the work, which by the terms of said contract the plaintiff was entitled to perform . . . were taken from the plaintiff . . . and given to other parties, whereby the plaintiff was deprived of the profit which would have accrued” to him, is insufficient to state a cause of action, because the facts alleged are inconsistent with the right reserved to the Corporation under paragraph 15 of the contract to omit or deviate from the plans and specifications or work as it may deem expedient, and because of the further provision of that clause that “no compensation shall be claimable by the contractor for any loss of anticipated profits because of such change, deviation, or omission.”
The defendant in the action against the Grand Trunk Railway Company of Canada and the defendant in the action against the Central Vermont Railway Company demurred to the first count, which is identical in each declaration except that a different railway company is made defendant. In substance, the first count alleges “that said defendant corporation desired to extend its line of operations to Providence, in the State of Rhode Island, . . .; that the laws of Massachusetts did not provide for the construction or operation of a railroad within the borders of said Commonwealth by a foreign corporation . . .; that the defendant . . . caused the •Southern New England Railroad Corporation to be organized under the laws of Massachusetts . . .; that said Southern New England Railroad Corporation was organized by the defendant merely as an instrumentality whereby the defendant might secure authority under the law to build within the limits of Massachusetts *497the desired extension of railroad necessary to carry into effect said project and plan . . .; that the defendant has the sole ownership and control of said Southern New England Railroad Corporation; that the defendant controls almost the entire subscription of capital stock; that the principal officers and directors of the defendant and said Southern New England Railroad Corporation are identical; that ... in the furtherance of said undertaking the defendant, through the instrumentality of its alter ego, the said Southern New England Railroad Corporation, entered into a contract with the plaintiff for the construction of that part of said extension which lies between the town of Palmer in the State of Massachusetts and the town of Blackstone in the State of Massachusetts, most of the terms of which contract appear in a certain written instrument with another instrument designated as 'Specifications for the Construction of the Roadway,’ both instruments being hereto annexed, marked 'A’.”
In substance and as argued, the defendants assign as ground for their demurrers (1) that the plaintiff’s claim is against the Southern New England Railroad Corporation with which the contract was made, and (2) that the defendant cannot be joined as principal and as an undisclosed principal in the same suit on a single contract.
As to the first ground we are of opinion the demurrer should be sustained. The contract was made with the Southern New England Railroad Corporation, duly incorporated to do the work and incidentally to make all necessary contracts therefor. The contracting company was separate and distinct from either of the other defendant corporations, which were created by the laws of two and different foreign States. The declaration does not allege that the plaintiff was ignorant of the interest of either of the defendants in the contracting corporation; nor is there any allegation of concealment of the fact that the defendant corporations controlled the stock and the principal officers and directors of the contracting corporation. The identity of stockholders and the control of the contracting corporation does not operate to merge the corporations into one or to make either the agent of the other. Richmond & Irvine Construction Co. v. Richmond, Nicholasville, Irvine & Beattyville Railroad, 68 Fed. Rep. 105. Salomon v. Salomon & Co. [11897] A. C. 22.
*498The motive of the defendant or defendants, that is, the desire of either of them to secure through the instrumentality of a corporations authority under the law to build the desired extension and thereby escape other than a restricted or limited legal liability for the acts and contracts of the corporation, cannot be regarded. Corporations, like individual stockholders, are distinct entities and neither can be treated as the “alter ego” or agent of the other when openly contracting for itself and in its own corporate name. Peterson v. Chicago, Rock Island & Pacific Railway, 205 U. S. 364, 392. Gardiner v. Treasurer & Receiver General, 225 Mass. 355, 370. Brighton Packing Co. v. Butchers Slaughtering & Melting Association, 211 Mass. 398, 403. Salomon v. Salomon & Co. supra. Montgomery v. Forbes, 148 Mass. 249, is not an authority for the plaintiff. In that case the defendant attempted and failed to organize a valid corporation to take over his business. It resulted that the business carried on in the corporate name remained his personal business, with an individual liability for debts and obligations thereby incurred.
We are of opinion the pleader does not describe in different counts the same defendant in different capacities, but attempts to state the cause of action in such a way as to make the declaration accord with two different possible views of the legal descriptive ground upon which to found an action against either defendant. It follows that the demurrer for misjoinder must be overruled.
The defendants demurred to the several counts in the action against the Southern New England Railroad Corporation, the Grand Trunk Railway Company and the Central Vermont Railway Company, on grounds substantially as follows:
1. That the first count is improperly joined with the second and third counts, in that the first count purports to set out a cause of action against the Grand Trunk Railway Company and the Central Vermont Railway Company while the second and third counts purport to set out a cause of action against all three defendants. As to this contention we are of opinion the first count does purport to set out a cause of action against the Southern New England Railroad Corporation as well as the other defendants, by the allegation “that on or about the 20th of July, 1912, in the furtherance of said project and undertaking, the defendants, *499through the instrumentality of their Massachusetts personality, the said Southern New England Railroad Corporation, entered into a contract with the plaintiff.”
2. That the declaration improperly joins the first count purporting to set forth a cause of action against all the defendants as principal with the second count, wherein all the defendants are named as principal and the Southern New England Railroad Corporation is also charged as agent of the other defendants. As to this contention we are of opinion it was improper and error to join in the second count the Southern New England Railroad Corporation as agent of a declared principal, with itself as principal, in a common and joint undertaking with the other defendants for which in the making of the contract with the plaintiff it is alleged to have acted as agent. As agent, the Southern New England Railroad Corporation could have been sued separately to judgment; or it co.uld have been sued jointly as principal with the other defendants as principal, and the action proceed against all parties until it appeared with reasonable certainty that one of the defendants was the agent of the others. The plaintiff would then be put to his election whether he would look to the agent or to the principals. Raymond v. Crown & Eagle Mills, 2 Met. 319. Weil v. Raymond, 142 Mass. 206, 213. Estes v. Aaron, 227 Mass. 96. Gavin v. Durden Coleman Lumber Co. 229 Mass. 576. The demurrer should be sustained.
There is no misjoinder between the several counts and the third count. The third count is upon an account annexed and in itself is assumed to contain all necessary allegations to render the defendants liable upon any common count. Noble v. Segal, 214 Mass. 159.
3. The defendants also demurred for the reason alleged and examined in the opinion in the actions against the Grand Trunk Railway Company and the Central Vermont Railway Company. In these actions we have considered these several grounds of demurrer, and need not repeat what has been there said.
It follows that the motions to strike out should be allowed and the demurrers severally sustained.
So ordered.