This is an action of contract. The declaration contains a single count. It sets forth a written instrument dated August 19, 1902, wherein, after a recital of the granting on that day of a location to the defendant on certain highways in the town of Southborough, the defendant agreed amongst several other stipulations to pay to the plaintiff the sum of $900 annually “with such sum in excess thereof as would equal its excise tax payable to said Town were all *236its tracks therein located in public ways.” The plaintiff, in consideration of all these agreements by the defendant, agreed to “take such land as may be necessary for widening and relocating any public ways that must be widened or relocated to enable said Company to construct its railway as provided in said location.” There are allegations of refusal by the defendant to pay $900 annually for the years 1920 and 1921 and consequent indebtedness.'
The answer of the defendant, in addition to a general denial, avers the illegality of the contract alleged in the declaration and also the enactment of St. 1919, c. 370, whereby provision was made that no excise taxes should be collected of street railway companies under St. 1906, c. 463, Part III, §§ 134, 136, and acts in amendment thereof or in addition thereto during 1920 and 1921.
The case was heard by a judge of the Superior Court, who made findings of fact in substance as follows:
In 1902 votes were passed at the annual meeting of the town of Southborough purporting to authorize the selectmen to contract with the defendant as to all matters concerning the location, construction and maintenance of the street railway of the defendant. After appropriate proceedings, on August 19, 1902, contemporaneously with the execution of the contract here in suit, the selectmen granted an original location to the defendant for the construction of its railway in Southborough.
The railway of the defendant then proposed and subsequently constructed was between Boston and Worcester. Within the town of Southborough the defendant proposed that the greater part of its length be over its private way. Its railway was to cross four public ways, and seventeen hundred feet were to be constructed on a public way in which, already, was a single track of another street railway. The locations were granted accordingly. Among the terms, conditions and obligations imposed in the location was one requiring the payment of $900 annually by the street railway to the town, in which was to be included the excise tax then provided by law. If such excise was less than $900, the company was to be credited with the amount thereof *237on account of such annual payment, and if the excise exceeded such sum in any year, then such excess was to be paid by the company to the town. The defendant accepted and constructed its railway in conformity to said location. After the location was granted and before the defendant railway began operation, the defendant acquired the franchise and property of the Framingham, Southborough and Marlborough Street Railway Company. The latter company had a considerable length of its tracks in the public ways of the plaintiff town. The excise or commutation taxes thereafter levied upon the defendant were distributed to the plaintiff as provided by law taking into account the tracks originally located as above described and the additional tracks so acquired by the defendant, that is to say, only those factors provided by law for the determination and distribution of said tax. In each year beginning with the year 1904 and up to the year 1920 the amount so levied and paid to the plaintiff exceeded the sum of $900 a year. In no year was the computation of the amount due, either as excise tax or under the contract, made taking into account all of the defendant’s tracks in the plaintiff town including those over private lands, nor did the defendant in any year pay to the plaintiff “ the annual payment of nine hundred dollars ($900.00) with such sum in excess thereof as would equal its excise tax payable to said Town were all its tracks therein located in public ways.” It was agreed that, subsequent to the execution of said contract, such land was taken as was necessary for widening and relocating public ways within the plaintiff town that needed to be widened or relocated to enable the defendant to construct its railway as provided by said location. It appeared during the negotiations preceding the granting and execution of the contract that, because of the small length of track to be operated by the defendant in the public ways in Southborough, the plaintiff would be entitled to but little of the excise to be imposed on the defendant under the provisions of law, and that the $900 annual payment was “ for expenses and repairs and clearing snow from public ways in excess of what would be covered by the amount to be paid the plaintiff by the defendant as excise or commutation taxes.”
*238The meaning of this finding is not clear. (1) It may mean that the parties fixed on this sum as the closest approximation possible in advance to the amount which would be due to the town annually as excise if the entire trackage of the defendant in the town were in the public ways. (2) It may mean that the additional expenses likely to rest annually upon the town by reason of the construction and operation of the street railway according to the location were estimated to amount to $900. (3) It may mean an annual payment of $900 by the street railway company to the town agreed upon by the parties as a contribution to the cost of general maintenance of ways in Southborough. See R. L. c. 14, § 47, now G. L. c. 63, § 66. Whatever may be the meaning of this finding, the question to be decided is whether the plaintiff can recover upon its declaration on the facts found. The declaration is framed on the written contract and not on the terms of the location. Nevertheless, it is apparent from an analysis of the terms of the contract that it was executed contemporaneously with the granting of the location and was devised to give additional assurance to the town of the performance of the terms, conditions and obligations imposed on the company by the location itself. So far as the present action is concerned, the only clause in issue relates to the annual payment of $900. While the words of the location are more explicit than those of the contract, it is manifest that that clause was founded upon the excise tax and was designed to secure to the town the payment annually of a larger sum of money than would probably be due under the terms of the excise tax law. The event has turned out differently, because later the defendant acquired and operated the tracks of another street railway company located so largely within public ways as to make the payment of the excise tax under the law in excess of $900. Whatever else may be said about the practical interpretation by the parties of the contract and location as to this payment during the years from 1904 to 1920, it is plain that it was treated as a substitute for the excise tax and that, so long as that excise exceeded $900, neither party was concerned about the contract or location on this point. The conduct of the parties *239in interpreting the contract confirms the idea that it was intended as a substitute for the excise tax. Such conduct is entitled to some weight in ascertaining the nature of the payment. Nash v. Webber, 204 Mass. 419, 424. Gallagher v. Murphy, 221 Mass. 363, 365. Crowe v. Bixby, 237 Mass. 249, 253. Rome v. Gaunt, 246 Mass. 82, 93. That conduct fortifies the natural inference to be drawn from the words used.
What the parties attempted to do was to make an additional and supplemental provision respecting the excise tax. Taxation is a function of the general legislative department of government. The laws established by it cannot be waived or changed by municipalities or their officers. Such laws are and must be general in their operation. When the Legislature has covered the whole subject, there is no room for the exercise of authority by local officers. The town has no power to make a contract concerning that subject. Cox v. Segee, 206 Mass. 380. Gile v. Perkins, 207 Mass. 172. Boston Rubber Shoe Co. v. Malden, 216 Mass. 508, and cases there collected. Parsons v. Lenox, 228 Mass. 231, 235.
The circumstance that the physical location of the railway was chiefly over private land rather than over public ways, and that thus the excise tax under R. L. c. 14, § 44, would be relatively small in comparison with the length of tracks in Southborough, did not justify an attempt to modify the excise law. The selectmen, in granting the location for the tracks of the defendant, acted as public officers performing a judicial or quasi judicial function. They were not agents of the town and were not bound by the votes of the town in respect to those functions. They cannot travel outside the limits of the law. Underwood v. Worcester, 177 Mass. 173, 175. Hewett v. Canton, 182 Mass. 220, 223. Flood v. Leahy, 183 Mass. 232. Hyde v. Boston & Worcester Street Railway, 194 Mass. 80, 83. Selectmen of Clinton v. Worcester Consolidated Street Railway, 199 Mass. 279, 286. Board of Survey of Arlington v. Bay State Street Railway, 224 Mass. 463, 469. Northampton v. Northampton Street Railway, 231 Mass. 540, 545. Cambridge v. Boston Elevated Railway, 241 Mass. 374, 378. They were bound by the same limitations *240in this particular, so far as they acted as agents of the town in making the contract.
There are many instances where, before or at the time of the exercise of the quasi judicial faculty by boards of public officers in laying out, altering or relocating public ways, contracts have been made with the municipality touching the expense of laying out, alteration or relocation of a highway whereby private individuals have contracted with the municipality to bear the whole or a part of such expense. In some instances payments or other arrangements have been made to reheve or lighten the expense to the city or town. Such contracts, payments or other arrangements have always been held valid and enforceable. Parks v. Mayor & Aldermen of Boston, 8 Pick. 218. Freetown v. County Commissioners, 9 Pick. 46. Jones v. Andover, 9 Pick. 146, 153, 154. Copeland v. Packard, 16 Pick. 217. Crocket v. Boston, 5 Cush. 182. Atkinson v. City Council of Newton, 169 Mass. 240. Brookfield v. Reed, 152 Mass. 568. Aspinwall v. Boston, 191 Mass. 441, 445. Estes v. Newton, 241 Mass. 229, 232. See Nevins v. City Council of Springfield, 227 Mass. 538, 542. Compare West Springfield & Agawam Street Railway v. Bodurtha, 181 Mass. 583. Such cases, however, rest upon a different principle and have no bearing upon the case at bar. They have no relation to the tax laws, although they may indirectly affect municipal revenues.
The case at bar also is distinguishable from the numerous decisions to the effect that " other terms, conditions and obligations in addition to the general provisions of law ” may lawfully be inserted in locations, such as Newcomb v. Norfolk Western Street Railway, 179 Mass. 449, Selectmen of Gardner v. Templeton Street Railway, 184 Mass. 294, Selectmen of Hyde Park v. Old Colony Street Railway, 188 Mass. 180, and Selectmen of Wellesley v. Boston & Worcester Street Railway, 188 Mass. 250.
The contract upon which this action is brought relates to the subject of taxation, which in essence is and must be authorized by a general law. If resort be had to the corresponding term of the location, it is subject to the same infirmity.
*241It follows that the contract, either standing alone or interpreted in connection with the location, related to the excise tax and was invalid and nonenforceable. While there is no decision exactly like the case at bar in its facts, it is governed in principle by Keefe v. Lexington & Boston Street Railway, 185 Mass. 183, and Board of Survey of Arlington v. Bay State Street Railway, 224 Mass. 463. The ruling that the plaintiff could not recover was right.
Judgment for defendant.