Day, J.
i. bail-BO ADS : constructiou of side-tracks overstreeis. I. It must be conceded that under the provisions of section 1321 of the Revision and the ordinance in question the Des Moines Valley Railway Company acquired the right to lay its track upon Market street, and that under the decisions of this State the proprietor of abutting property could not recover damages if the track was constructed and operated in a proper manner. See Milburn v. The City of Cedar Rapids, 12 Iowa, 246; Slatten v. Des Moines Valley Railroad Co., 29 Id., 152; City of Davenport v. Stevenson, 34 Id., 225; City of Clinton v. Railroad Co., 37 Id., 61; Ingram et al. v. C., D. & M. Railroad Co., 38 Id., 669; Cadle v. Muscatine Western Railroad Co., 44 Id., 13; Barr v. City of Oskaloosa, 45 Id., 275; Davis v. Chicago & N. W. Railway Co., 46 Id., 389; The State v. Davenport & St. Paul Railway Co., 47 Id., 507. Before the switch in question was constructed, however, the following changes in the law had been made: Section 1321 of the Revision had been amended by chapter 47, acts of Fifteenth General As sembly, so as toread as follows: “Any such corporation may raise or lower any turnpike, plank-road, or other highway, for the purpose of having its railway cross over or under the same, and in such, cases said corporation shall put such turnpike, plank-road or other way, as soon as may be, in as good repair and condition as before such alteration at such place of crossing.” Section 464 of the Code, as amended by chapter 6 of the laws of the Fifteenth General Assembly, respecting the powers of cities, had also been enacted, as follows: “They *404shall also have the power to authorize or forbid the location or laying down of tracks for railways and street railways on all streets, alleys, and public places, but no railway can thus be located and laid down until after the injury to property abutting upon the street, alley, or public places upon which such railway track is proposed to be located and laid down has been ascertained and compensated in the manner provided for taking private property for works of internal improvement in chapter 4 of title 10 of the Code of 1873.” See Miller’s Code, Sec. 464.
The principal question involved in this case is to what extent and in what manner is the defendant, which succeeded to the rights of the Des Moines Yalley Railroad Company, affected by this change in the statute? It is insisted upon the part of the appellant that when the Des Moines Yalley Railroad Company, under a legally conferred authority, constructed the line of its railway upon Market street, that it thereby acquired the right at any future time to construct upon that street such necessary side tracks and switches as its increasing business might demand, and that the exercise of this right cannot be restricted or controlled by any amendment of or change in the law. Appellant cites and relies upon Cleveland & Pittsburgh Railroad Co. v. Speer, 56 Penn. St., 326, as in its essential features like the case at bar. This case, however, is not in point upon this question as there had been no change in the general law intermediate the date of the construction of the main line and the switch complained of. The points determined were, that a charter authorizing the construction of a railroad necessarily confers the power to construct side-tracks and switches, and that for the construction of a railway over a street in a town, pursuant to provisions of the charter, the owner of an abutting lot cannot recover damages. Section 464 of the Code is in terms applicable to all railway tracks which may be constructed in the streets of a city after its passage. It applies to the defendant, we think, unless to allow it *405such application would contravene some constitutional provision. In the enactment of section 1321 of the Revision, the State made no contract, either express or implied, that as to the' Des Moines Talley Eailroad Company or those succeeding to Js rights, this section should remain for all time unrepealed or unamended. Citizens have no vested rights in the existing general laws of the State which can preclude their amendment or repeal, and there is no implied promise on the part of the State to protect its citizens against incidental injuries .occasioned by changes in the law. Cooley’s Constitutional Limitations, page 347.
There is no implied contract between a State and a corporation that there shall be no change in the laws existing at the time of the incorporation which shall render the use of the franchise more burdensome or less lucrative, any more than there is between the State and an individual that the laws existing at the time of the acquisition of property shall remain perpetually in force. Thorpe v. The Rutland & Burlington Railroad Co., 27 Vt., 140; Rodemacher v. The Milwaukee & St. Paul Railroad Co., 41 Iowa, 297. It is conclusively presumed that the Des Moines Valley Railroad Co. constructed its line of railway upon Market street with knowledge that the State might repeal or modify the existing law as to the manner in which any more of that street might in the future be appropriated, and that it impliedly consented that the State might do so. Neither it, nor its grantee, can justly complain that this privilege has been exercised. The company may insist that its right to the property which it has acquired shall be recognized and respected. But it cannot lawfully demand that all the provisions of the statute in force when this property was acquired shall be continued for the purpose of rendering its use more convenient and profitable.
The ordinance relied upon by defendant does, it is true, purport to constitute a contract between the city of Des Moines and the Des Moines Valley Railroad Company. But the city *406of Des Moines is a mere creature of the statute and can exercise such powers only as. are directly, or by necessary implication, conferred upon it. It is not competent for the city, by ordinance, to take away the general power of the State to revise or amend its statutes. In accepting the ordinance from the city the Des Moines Valley Railroad Co. is presumed to have known what limitations the law imposes upon the city’s authority. There is no analogy between a right of way acquired in the street of a city under section 1321 of the Revision, and the right of way acquired in the country under proper condemnation proceedings. Where a right of way is acquired under the statute for the condemnation of private property, the railway company acquires a right to the exclusive use of the whole one hundred feet in width, and may cover it with tracks. But a right of way acquired under section 1321 of the Code must he enjoyed in connexion with the public, and the railway company must put the street in as good repair as it was before any alteration which it may have made in grade. What we have said applies to the first three counts of the answer.
2. constitutiona! II. The sixth count of the answer alleges, in substance, that on the 22d day of March, 1858, the legislature of the State of Iowa passed an act granting to the Keokuk, Ft. Des Moines & Minnesota Railroad Company, subsequently known as the Des Moines Valley Railway Company, certain large bodies of land, and requiring said company to pay certain large outstanding liabilities of the Des Moines River Improvement Co., and certain other liabilities then existing against the State of Iowa, and to complete their road to and through the town of Ft. Des Moines, now city of Des Moines, within a limited time, and that in the maintenance and operation of said line of railway, and in the discharge of its obligations arising under said act of the legislature, and of its obligations as a common carrier imposed npon.it bylaw, it became necessary to enlarge its facilities by the laying of the switch complained of.
*407Section 464 of the Code confers upon cities power to authorize or forbid, the location or laying down of tracks for railways on all streets, alleys, and public places. Now it may be that the State, having by special statute, and as a condition of the enjoyment of its bounty, required the construction of the railway in question to and through the city of Des Moines, cannot constitutionally authorize the city to forbid the company such use of the streets as may be necessary to the proper and successful management of its road.
It is apparent from an examination of section 464 of the Code that the legislature had two distinct objects in view, namely: first, to give to the cities complete control over their streets, and to impower them to forbid their occupation by lines of railway; second, to provide that the streets could be occupied by railway tracks only after compensation for the injury to abutting property. Now, if it should be conceded that the first object, as to the defendant, cannot be accomplished, this is no reason why the second object may not be attained. The law may, as to the defendant, be unconstitutional and inapplicable so far as the first object is concerned, and perfectly constitutional and applicable as to the second. In Cooley on Constitutional Limitations, fourth edition, page 215, it is said: “Where a part of a statute is unconstitutional, that fact does not authorize the courts to declare the remainder void also, unless all the provisions are connected in subject-matter, depending on each other, operating together for the same purpose, or otherwise so connected together in meaning, that it cannot be presumed the legislature would have passed the one without the other'. The constitutional and unconstitutional provisions may even be contained in the same section, and yet be perfectly distinct and separable, so that the first may stand though the last fall.” If it should even be conceded that, under the facts alleged in the sixth count, the defendant cannot be denied the right to construct the switch in *408question, still we are clearly of opinion that it can be done only upon making compensation as provided in section 464.
“compensapa°s. tres' III. The fourth count alleges that no part of the switch is laid upon plaintiff’s premises, and that the grade in front of plaintiff’s property has not been changed. Appellant insists that section 464 of the Code requires compensation to be made only for a change in the grade of the street. This argument is based mainly upon the fact that the section, as originally enacted, provided that the injury to abutting property should be ascertained and compensated in the manner provided for compensation of injuries arising from re-grade of streets in section four hundred and seventy of this chapter. It is said, and perhaps correctly, that section 469 is the one intended by the legislature.
By chapter 6, laws of Fifteenth General Assembly, section 464 of the Code, was amended by striking out the words above indicated in italics, and substituting in lieu thereof the following words: “Taking private property for works of internal improvements, in chapter 4, of title 10, of the Code of 1873.” Whatever may have been the proper construction of the section before the amendment, we are clearly of the opinion that now the compensation to be made can not be limited to damages arising from a change of grade, but that it extends to all legitimate damages arising under chapter. 4, title 10 of the Code.
IV. The seventh count of the answer alleges that plaintiff has failed to take any steps to have the damages assessed or appraised as provided by law, and that the remedy of plaintiff, if any he have, is to have his damages assessed according to the statutes relative to proceedings for condemnation of right of way. In Daniels v. The Chicago & N. W. Railroad Co., 35 Iowa, 130, 135, it is said: “It has been quite uniformly held, and may now be regarded as the settled doctrine in this country, under statutes such as ours, that the statute furnishes the only mode of ascertaining the damages consequent upon
*409the taking of private property for public use.” See also authorities cited in this case on page 136. The case of Donald v. The St. L., Kansas City & N. Railroad Co., 52 Iowa, 411, does Dot militate against this rule, as in that case the question of defendant’s liability was submitted to the Circuit Court, by agreement, on an agreed statement of facts, but the question as to the exclusiveness of the statutory remedy was not relied hpon nor presented. A distinction, however, may very properly be recognized between the damages which have beén sustained at the time of the commencement of the suit, and the permanent damages which will arise from the continued occupation and use of the right of way. The former, we think, may be recovered by action, although the latter must be assessed as provided in the statute. In Ford v. The Chicago & N. W. Railroad Co., 14 Wis., 609, 617, it is said: “It seems that the past damages, or those occasioned by the trespass, might have been assessed by the court (William v. Railroad Co., 16 N. Y., 97); or the judge might perhaps have ordered a jury for that purpose; but the permanent damages, or those which would accrue to the plaintiff by the continued use of the land by the company, can only be ascertained in the manner prescribed by the statute.” It is said this doctrine is not applicable, because the plaintiff does not own any part of the street, and no trespass was committed upon his property. But the occupation of the street without compensating the plaintiff for the damages sustained was an unlawful act, and for this unlawful act the plaintiff, if iujured thereby, may recover. The matters set up in the seventh count were not pleaded as a partial, but as a complete, defense.
It follows that the demurrer, as to all the counts of the answer, was properly sustained.
Affirmed.