We think this action cannot, be maintained; not because the money, having been demanded and paid, cannot be reclaimed, but because it was rightfully paid.
*28In describing the route to be followed by the plaintiffs in the construction of their railroad, the charter says, “ thence crossing the track of the Boston and Lowell Railroad, at or near the Arch Bridge, and running within the location of the said railroad, by or near the east side of said tracks, to a point between the bridge over the old Boston road and the junction of the branch railroad leading to the Lowell Bleachery, with power to alter, in a suitable manner, within said limits, and under the provisions hereinafter contained, the bridges and abutments across said Boston and Lowell Railroad, and with power to diverge easterly therefrom, by one or more tracks, to some convenient point or points, not more than fifty rods therefrom.” Si. 1846, c. 157, § 2.
By the third section the plaintiffs are authorized to enter, with their road, upon the Boston and Maine Railroad and the Nashua and Lowell Railroad, at the points described in the act, “ and upon that part of the Boston and Lowell Railroad which is north of the junction of the branch leading to the Lowell Bleachery, and to use the same or any part thereof.”
The fourth section directs the plaintiffs to construct and maintain so much of their track as is within the location of the defendants’ road, and to cross the track of the defendants’ road, in such manner as the defendants shall prescribe.
Section 5 provides that if the plaintiffs shall object to the place and manner in which they shall be required to construct and maintain their crossing and track by the defendants within their premises, the same shall be determined by commissioners under the provisions of the Si. of 1845, c. 191; and it is further provided in the same section that the plaintiffs shall pay to the defendants “ a reasonable compensation for such use of their road as is granted by this act, the amount to be paid in one sum, and not as annual rent, and to be determined, in case of disagreement, by three referees, two of whom the said companies should appoint, (each company appointing one,) and the two shall choose a third.”
Under these provisions of the charter the defendant corporation prescribed the place and manner in which, within the limits *29of their location, the plaintiffs should construct and maintain their track and cross the track of the defendants’ road. The plaintiffs objected, and the matters were submitted to referees, by whose award the location, construction and maintenance of the tracks were determined.
The parties subsequently referred to the same referees the matter of compensation to be paid by the plaintiffs to the defendants “ for such use of their road as is granted by the act aforesaid ”—the plaintiffs’ charter. And the referees determined the sum which, in their judgment, was a reasonable compensation to the defendants “ for such use of their road as is granted by the act referred to in said agreement ” of submission.
At the time this right and authority were conferred upon the plaintiffs to enter upon and use the road of the defendants, to the extent and under the limitations stated, the defendant corporation had constructed certain branches extending to the works of the mills in the city. Under their charter, however, their road was located only to the south side of Merrimack Street. Such was the legal location filed. The branches were constructed by agreement, we suppose, with the owners of the land over which they passed. We see no provisions in the charter of the defendant corporation, by which the branches were authorized. They must have been built and continued by convention or sufferance. The Boston and Lowell Railroad, as such, was a way ascertained and determined by its location, filed with the county commissioners of Middlesex. See Sts. 1830, c. 4, § 13; c. 79. That location constituted the written permanent record evidence of its courses and boundaries. Hazen v. Boston & Maine Railroad, 2 Gray, 574. The charter of the plaintiffs authorized them to enter upon that part of the Boston and Lowell Railroad north of a given point, and to use the same or any part thereof. What that part was, was certain, because it could be made certain by reference to the location, and by that location the northern terminus of the road was the south side of Merrimack Street.
The charter of the plaintiffs, and the action under it of the parties and of the arbitrators, had reference plainly to the Bos*30ton and Lowell Railroad as then established by law, with its courses and boundaries fixed by its filed location.
By the Si. of 1847, c. 185, the Boston and Lowell Railroad Corporation were authorized to locate, construct and maintain certain branches of their road, in the act described. That act, so far from being, as the plaintiffs contend, intended as a recognition and confirmation of the branches as already existing, by its third section provides that the powers it grants shall not be exercised till the defendant corporation have indemnified the city of Lowell against a claim for damages in the act specified. And section 5 provides that the city council of Lowell may have and exercise, in respect to the branches, the powers given to county commissioners by the St. of 1846, c. 271; the provisions of which, among other things, regulate the mode in which railroads shall be constructed when crossing the public ways.
But, as if to free the matter from all difficulty, the act of 1847, in fixing the course of the first branch, describes it as commencing at the northerly terminus of the defendants’ road in Lowell, crossing Merrimack Street, and running along the northerly side of Moody Street, &c. Another branch is described as “ extending from the northerly terminus aforesaid, across Merrimack Street; ” in terms recognizing the northerly terminus of the road then existing, as the southerly side of Merrimack Street.
Though the determination as to the compensation to be paid by the plaintiffs to the defendants was made some two years after the passage of the act authorizing the defendants to construct their branches, the submission by the parties and the ■award of the referees are evidently confined to the defendants' road, as legally located and existing when the plaintiffs’ charter was granted.
So far as the branches therefore are concerned, the case seems to us comparatively free from difficulty.
But the moneys paid by the plaintiffs were for transportation of their merchandise, not only over the branches, but over that portion of the defendants’ road which lies between the point where the track of the plaintiffs’ road crosses the tracks of the *31defendants’ road near the arch bridge, and the northern terminus of the defendants’ road on the south side of Merrimack Street. The question therefore arises, whether for transportation over this part of the road the defendants were entitled to compensation. Clearly they are so, unless the compensation for such use of this portion of the road was embraced in the award of the referees.
Though the question is not free from difficulty, we think such use was not included in the award. The charter of the plaintiffs grants to them, so far as the road of the defendants is concerned, two distinct powers. The first, contained in the second section of the charter, is the right to construct their railroad for a limited distance within the location of the Boston and Lowell Railroad, and, for that purpose, to make changes in the bridges and abutments across said road, and with power to diverge therefrom by one or more tracks. The second is a right, given in the third section, to enter, between certain points, upon the defendants’ road, and to use the same or any part thereof. The charter was passed a year after the St. of 1845, c. 191, regulating the use of railroads, and refers to it. By the first section of that act, no motive power is allowed to run upon any railroad constructed by the authority of this commonwealth, except such as belongs to and is controlled by the corporation owning and managing such road, unless by the consent of such corporation. By § 2 every railroad corporation, the owner of a railroad in use, is required, at reasonable times and for a reasonable compensation, to draw over their road the passengers, merchandise and cars of any other railroad corporation which has been or may hereafter be authorized by the legislature to enter with their railroad upon, or to unite the same with, the road of such corporation, and use such last named road. If the parties cannot agree upon the compensation, it is to be fixed by commissioners appointed by this court, who are to determine the rate of compensation, and, if the parties cannot agree, the stated periods at which the cars are to be driven, having reference to the convenience and interest of the corporations, and of the public to be accommodated thereby. Such compensation, it is obvious, *32must depend not only upon what is drawn over the road, but upon the times when, and the degree of inconvenience and amount of expense incurred by the corporation drawing.
The right therefore, granted by the third section of the plaintiffs’ charter, was an indefinite one, the use of which was to be regulated not merely with reference to the convenience of the parties, but of the public; and the compensation for which should be graduated by the extent and frequency of such use. Construing this grant in the light of the statute of 1845, the plaintiffs had a right to insist that the defendant corporation should draw the cars of the plaintiffs over its road, at such times and for such compensation as three discreet disinterested men should determine. This is necessarily so, unless we suppose that the legislature meant to except the plaintiffs from the operation of this most salutary law. This is not claimed.
When therefore, by the fifth section of the plaintiffs’ charter, it is provided that the company hereby created shall pay to the Boston and Lowell Railroad Corporation “ a reasonable compensation for such use of their road as is granted by this act, the amount to be paid in one sum, and not as annual rent,” and to be determined, in case of disagreement, not by commissioners appointed by this court, but by referees, two of whom the companies shall appoint, each company appointing one, and those two a third, the question is whether the legislature intended thereby the use of the defendants’ road specifically given by the act, that is, for the construction of a portion of the plaintiffs’ road within the location of the defendants, or whether they intended to include also a compensation to the defendants for drawing the cars of the plaintiffs over their road, without limitation as to the times when, the number or weight of cars, or the period for which the service was to be performed. We think it was the compensation for the use of the location of the plaintiffs’ road that was meant by “such use of their road as is granted by this act; ” and that only. And such, we think, was the construction of the parties when the submission was made, and that the submission was intended only to include this use of the location of the defendants’ road. The authority given to *33the agent of the defendants went no further. It was to submit the claim for compensation, which the defendants had upon the plaintiffs for the use of their road, as heretofore awarded by the referees, naming them. That award is confined wholly to the use of the defendants’ location.
The vote of the plaintiffs’ corporation, though the limitation is not so explicit, yet shows clearly that the same subject matter was in view. It gave the committee “ full power to settle and adjust with the Boston and Lowell Railroad Corporation the place and manner of crossing their road by the railroad of this corporation, and of constructing, maintaining and using the railroad of this corporation within the location of the Boston and Lowell Railroad Corporation, and all other questions and all difficulties that may arise between the two corporations,” with power to submit to arbitration.
The submission and the award follow the language of the fifth section of the plaintiffs’ charter, which, if our construction is just, was intended to include the compensation for the use specifically given by the act, to wit, for the use of the construction of the plaintiffs’ road within the location of the defendants’ road, and the damages incident thereto.
Being, for these reasons, of the opinion that these moneys were rightfully paid, there is no occasion to consider the second ground of defence. Judgment for the defendants.