delivered the opinion of the court.
This is an appeal from an order of the State Corporation. Commission, rendered upon the petition of certain citizens-residing in Powhatan county, praying that the Corporation Commission require the Chesapeake and Ohio Railway Company to provide proper facilities to people living on the. south side-of James river, in the neighborhood of Maiden station, on said road, for the transportation of persons and produce to the said', railroad station.
The proceedings before the commission upon this petition-resulted in a judgment that the Chesapeake and Ohio Railway-Company, with all practicable dispatch, “erect, at its own. expense, a suitable and proper bridge, for passengers and’ vehicles, across James river at a convenient point opposite to- and connecting with Maiden’s station.”
The facts which we deem material to be considered are as-follows: The James River and Kanawha Company was chartered to construct a waterway, beginning at the head of tidewater, on the James river, and connecting the waters of that stream with those of the Kanawha. By an act passed February 27, 1879, the Richmond and Alleghany Railroad Company was authorized to purchase the franchises and property* *299of the James River and Kanawha Company, and hy that act it was provided that the railway company should “furnish to-the people on the south side of James river, for the transportation of persons and produce across James river to the line-of their railroad, facilities the same, or at least equal to those (then) now afforded hy the James River and Kanawha Company.” It appears also that the Chesapeake and Ohio Railway Company has succeeded to the rights and assumed the duties and responsibilities of the Richmond and Alleghany Railroad Company; that the James River and Kanawha Company did not own or run any boats for the transportation of passengers or freight, but that it furnished the waterway and charged tolls for its use, and that the boats were furnished and operated by others for the purpose of carrying passengers and freight for hire; that by sundry acts of the Legislature, passed at various dates prior to the 27th day of February, 1879, the James-River and Kanawha Company, in order to accommodate the traffic on the south side of James river, built bridges and established ferries at certain points; that near Maiden’s Station, in the territory covered by this proceeding, there was a dam across James river, above which was a pond extending up to Cedar Point, a distance of about five miles; that the canal of the-James River and Kanawha Company passed into the river at Cedar Point, the river from that point to the dam being used as the canal, the towpath being on the north bank of the river; that between the dam and Cedar Point the canal company had constructed no bridges and operated no ferries. It appears that the canal company never owner or operated any boats such as are referred to in the petition, nor did it ever receive or deliver at Maiden’s Station, the point in question, either persons or produce on the south side of James river; that the James River and Kanawha Company, at the point in ques*300tion, furnished nothing for the south side connection, but that above the dam, nearly opposite Maiden’s station, a ferry was owned and operated by other persons, and is now owned and •operated by one J. C. Bowles, and that the river itself and the boats that were run by other people, which took passengers and freight from -and to the south side, together with the ferry, were the only facilities furnished for crossing the river.
The ferry at Maiden’s and that at Irwin have not at all times been kept in good order and condition for the transportation ■of persons and produce, and at the instance of one or more of the petitioners, the owner of the ferry at Maiden’s has been fined for dereliction in the discharge of his duties as such ferry -owner.
On the 20th day of May, 1887, Extra Session Acts of 1887, page 422, an act was approved which is, in part, as follows:
“Whereas numerous residents of the James river valley have presented a petition setting forth that serious injuries are being inflicted upon that region by the maintenance of sundry dams •of the Richmond and Alleghany Railroad Company, and asking that such steps as are practicable be taken to secure the destruction or removal of said dams for the purpose of improving the sanitary conditions and lowering the flood lines; and whereas the receivers in charge of the property of the Richmond and Alleghany Railroad Company have joined in said petition and expressed their readiness' fully to co-operate in said endeavor, provided there can be secured such protection as would warrant the very large outlay which the destruction or removal of the dams will involve; and, whereas, it is deemed expedient to ■grant the prayer of the petition to the extent and under the limitations here provided; therefore,
“Be it enacted by the General Assembly of Virginia, That ■there shall be appointed by the Board of Public Works three dis*301creet, intelligent, and impartial men, neither bondholders nor stockholders of the James Eiver and Kanawha Company, the Eichmond and Alleghany Eailroad Company nor owners of, nor interested in, any lands, property or improvements to he affected by the terms of this act, who shall constitute a hoard of commissioners to examine into the feasibility of removing so-many of the dams belonging to the Eichmond and Alleghany Eailroad Company as may be removed without violation of its charter obligations and without injury to any existing or vested rights. The said commissioners shall confer with the said receivers or their successors, and all parties who have grants or leases-of water power, who shall furnish them with all needful information, and the said commissioners shall determine which of the said dams should be destroyed or removed and which should be retained, and shall report the result of their examination so-far as approved and confirmed, in the manner hereinafter provided, to the board of public works. The said commissioners-shall also, with the advice of such member of the State Board of Health, or any doctor of medicine, as may he designated by the Governor for the performance of such duty, decide and instruct the said receivers, or their successors, as to the season of the year when the destruction or removal of such dams shall be effected. Hpon such report being made to the Board of Public Works the said receivers, or their successors, the Eichmond and Alleghany Eailroad Company, or any successor company, shall be authorized and empowered to remove or destroy the dams, or any of them, determined and reported as practicable and proper to be removed, as above set forth; and if the same he removed and destroyed in conformity with the terms-of this act, then neither the receivers nor the Eichmond and Alleghany Eailroad Company, nor its successor company, shall' be responsible or liable for any damages which may be claimed *302to result from such destruction or removal, except such damages ns may he awarded for the condemnation of water grants and leases as hereinafter provided.”
It will he observed that the obligation sought to be imposed upon the Chesapeake and Ohio Railway Company is contractual in its nature. That contract is to be found in the 15th section of the act of February 27, 1879, and by its terms the duty of the railway company is to be measured. It can neither be added to nor taken from, but is to be enforced as it is written, the function of courts being not to inquire what, in their judgment, would have been a reasonable and proper contract for the parties to have made under a given state of facts in order to meet the conditions and equities of the situation, but to ascertain the terms of the contract upon which the parties have, in fact, agreed, and to give effect to it.
The obligation of the Richmond and Alleghany Railroad •Company, in whose shoes the Chesapeake and Ohio Railway ■Company stands, was to continue to provide for persons residing on the south side of James river “facilities the same, •or at least equal, to those now (then) afforded by the James River and Kanawha Company for the transportation of persons and produce to the line of the railroad.” That was the extent •of its obligation—to do no more and to do no less than the James River and Kanawha Company was doing at that time ■and place. It might have been wise had the Legislature required the railway company to furnish to the region on the south side of James river naturally tributary to Maiden’s station “proper and easy facilities for crossing the river and reaching the station,” proper and easy facilities for' taking passage on the boats having been formerly afforded by the James River and Kanawha Company; but however- proper it may Lave been, no such term appears in the contract as made. The *303James River and Kanawha Company. neither owned nor operated boats; the sole facility which it afforded was the waterway along which boats owned by others passed, transporting passengers and freight. To require the railway company to provide facilities for the transportation of passengers and freight across the river would be to impose upon it a service nor received from the James River and Kanawha Company by those residing upon the south side of the river, but which was furnished by those who owned and operated boats which passed along and over the waterway furnished by the canal company; and this would be the introduction of a new term into the contract of the railway company and the creation of an additional obligation, which it is beyond the province of the courts to do.
The gravamen of the complaint of petitioners seems to have its root in the act of May 20, 1887. That act in its preamble declares that the Legislature was moved to its passage by the petition of numerous residents of the James river valley, who claimed that serious injuries were being inflicted upon them by the maintenance of certain dams across James river, and that their removal would be not only beneficial to health but to property, “improving sanitary conditions and lowering the flood lines.” The Legislature appointed an impartial commission, whose duties were hedged about by careful and judicious provisions, and the evidence shows that the wort of removing the dams was executed in conformity with the terms of the act, and that the railroad company and its successor are entitled to the immunity from damages which was pledged to them by the State in that act.
The dam at the point under consideration having been destroyed, the only facility which the James River and Kanawha Company had ever furnished at that point ceased to exist.
*304That the act of May 20, 1887, is a valid exercise of power on the part of the State there can be no doubt. It was passed in the exercise of the police power of’ the State, for the protection of property and the promotion of the health of the inhabitants of the James river valley, and its constitutionality is not affected by the fact that an incidental result of the exercise of the power has been injurious to individuals.
As was said by Mr. Justice Harlan, in C. B. & Q. Ry. Co. v. State of Illinois (U. S.), 26 Sup. Ct. 341, in an opinion delivered on the 19th of February, 1906, “The police power of a State embraces regulations designed to promote the public convenience or the general prosperity, as well as regulations designed to promote the public health, the public morals, or the-public safety.”
The courts cannot restore conditions as they existed at the passage of the act authorizing the destruction of the dams. That act being a valid exercise of legislative power, by it the railroad company was relieved from all liability for damages resulting from what was done in strict pursuance of the terms of that act. The obligation of the railroad company was to furnish, for a specified purpose, facilities equal to those afforded by the canal company at the timé of its contract. The only facility then furnished or afforded by that company was the waterway. That waterway still exists, except in so far as its condition is changed by the removal of the dam. That dam was removed by express legislative authority, which exonerated the railway company from all consequences incident to its removal. It would have been wise, perhaps, had the Legislature, in the act of 1879, required the railway company to furnish “proper and easy facilities” for crossing the river with passengers and freight, but it did not do so, and we can import no new term into its contract. It might have been wise had the State re*305quired, upon the removal of thé dams, that the railway company should provide other means for the transportation of passengers and freight across James river, for the benefit of residents upon the south side of that stream, as a condition precedent to the immunity which it granted to the railway company ; but in its wisdom the' Legislature saw fit to omit such conditions.
A good part of the argument in this case was devoted to the subject of jurisdiction. We shall not go into a discussion of the various statutes upon the subject which are adverted to in the argument on behalf of the Chesapeake and Ohio Railway Company. We think the language of the Constitution is broad enough to confer jurisdiction upon the Corporation Commission to hear and determine the matter in controversy; but for the reasons stated, we are further of opinion that the Corporation Commission erred in requiring the Chesapeake and Ohio Railway Company to build a bridge across James river opposite Maiden's station.
Reversed.