statement of iaot3, This case comes here on the record, without case-made or bill of exceptions, and the only error alleged is, that the petition does not state facts sufficient to constitute a cause of action against the plaintiff in error. The defendant in error sued jointly the Junction City & Fort Kearney Railway Company, and the Kansas Pacific Railway Co., to recover $600 as damages caused by the failure of the said J. C. & Ft. K. railway company to comply with a certain contract entered into between said company and said Hopkins, whereby the said Hopkins was to deed, the right-of-way through a half-quarter-section of land, and the fee-simple title of a piece of land bordering on such right-of-way, to the J. C. & Ft. K. railway company upon their building a side-track, depot, and station buildings on said half-quarter-section; and said railroad company was also to furnish Osage orange plants to fence the railroad, and was to pay for growing the fence, when sufficient to turn stock. The contract was dated 27th January 1873, and it provided that the depot and side-track should be constructed on or before the 1st of January 1874. *496The petition further alleged that the J. C. & Ft. K. railway company afterward assigned, transferred and conveyed to the K. P. railway company, by a lease for ninety-nine years, its railroad, property, rights and franchises pertaining thereto, and that the K. P. railway company, in consideration of such conveyance, and the property and rights it thereby received, it agreed and undertook on its part to discharge and perform all obligations and contracts to be performed by the J. C. & Ft. K. railway company and to pay all debts and dues of said company which were or had been entered into, incurred, or contracted; that immediately after the execution of the said agreement of January 27th, both of said railway companies entered upon and operated for a right-of-way, without other compensation than the said premises and agreements, a portion of the plaintiff’s premises stated in the contract, and that the K. P. railway company has ever since continued to occupy and use as a right-of-way, for its roadbed and railway track, the said premises, and continues in the possession and enjoyment of the same; that neither of the railway companies has ever paid or offered to pay for the land so appropriated, or for any damages occasioned to said Hopkins by reason of the building of the road, and that the said railway companies have wholly failed, neglected and refused to perform any of the agreements of the written contract to build the depot, station buildings and side-track, or furnish, as agreed, the Osage orange hedge plants. The petition was filed January 30th 1875. A verdict was returned by the jury for the defendant in error against the K. P. railway company for $100, and thereon judgment was rendered against the plaintiff in error.
,. ments of facts. The petition is attacked upon the grounds, that the averment of the refusal of the companies to build the depot, station buildings, and side-track, on the premises, or furnish the Osage orange plants, is inconsistent with the text 0f agreement, which plaintiff in error claims imposes no obligation whatever on the railroad company to build, but was in the nature of a conditional promise tó con*497vey. This condition being unperformed, the contract was altogether (it is claimed) determined, and the rights of the parties were just the same as if it had never been entered into at all, and that the pleading cannot be maintained, because the plaintiff below does not therein allege that either entry or possession was without his consent, but adopts the possession of the companies, and grounds his claim for payment upon it. We do not think the petition liable to the construction placed upon it by counsel of plaintiff in error. The petition sets out the execution of the agreement; the assumption of the obligations therein created against the J. C. & Ft. K. railway company by the K. P. railway company; the fact that the only consideration moving to Hopkins to part with his land for a right-of-way in this manner was the concurrent agreement of the J. C. & Ft. K. railway company; the entry of the two companies named upon the land of defendant in error immediately after the execution of the agreement, and in pursuance of such agreement; the continued use and occupation of the land for a right-of-way by the K. P. railway company; the failure and refusal of either company to perform any of the said agreements; the damages occasioned by such failure, and demand of judgment. Under the agreement, the said K. P. railway - company, by its contract with the J. C. & Ft. K. railway company, has received all the benefits of said agreement, has obtained the possession of the premises occupied by it, and it cannot now be relieved of its liability in the premises. The plaintiff in error accepted the agreement between Hopkins and the J. C. & Ft. K. railway company with its burdens as well as its benefits. But for this agreement and the contract between the two railway companies, Hopkins could have prevented the entry of either company on his land, until full compensation therefor had been first made in money, or duly secured, irrespective of any benefit from the construction of either road. He consented to the entry and occupation thereof, relying on the written promise of the J. C. & Ft. 3L railway company, for which the K. P. railway company made itself liable; and de*498fendant in error did not adopt the possession of the companies as his claim for damages, but the entry of such companies and the possession of the same by virtue of the contract, and their refusal to comply with the terms of the contract on their part. As the deed to be executed by Hopkins was not to be made until after the construction of the depot and side-track, of course, as a condition precedent to maintain this suit for damages, it was not necessary for Hopkins to either deliver or offer to deliver to the railroad companies a deed.
Right-of-way; contract for; remedy. Counsel for plaintiff in error cites many authorities to show that the statute furnishes the only mode of ascertaining the damages consequent upon taking private property for public use, and asserts that these support his objection to the petition. The authorities in our opinion do not x x apply where a written contract exists between the parties as to the price to be paid for the right-of-way to be appropriated by a railway company. In this case, the compensation agreed upon to be paid for the right-of-way was the erection of the structures, the furnishing of the hedge-plants, paying for the cultivation thereof, etc., as provided in the contract; and the failure of the- company to comply therewith, after entry and possession for right-of-way, rendered it necessary to ascertain their equivalent value in money to Hopkins, or in other words to assess his damages as compensation for the particular thing the company agreed to do for the right:of-way under the contract, and which the company had failed to perform. In such a case the land-owner can at once, upon breach of the contract, have recourse to a court of law, and need not of necessity resort to the tribunal prescribed by the statute to have his damages assessed for the right-of-way appropriated from his lands. There is nothing in the statute prohibiting parties .from making their own agreements as to the price to be paid for a right-of-way for a railway; and when a contract is made therefor, the parties thereto are equally as much bound as.the obligors to any other valid agreement. Mhen parties do not voluntarily *499agree as to the compensation for the right-of-way appropriated (or to be appropriated) by a railway corporation, the statute provides the mode of ascertaining the compensation to the land-owner; but this statute in no manner prohibits parties from making their own agreements as to such compensation. The contract being in writing, the law presumes that there was a sufficient consideration for the agreement, and not being violative of any statute, or against public policy, of necessity is valid and capable of being fully enforced. (Northern Kansas Land Co. v. Oswald, ante, 336-339.)
Contract; promtenfor Again, the petition is attacked on the ground that it is wholly bad, because it does not allege that Hopkins accepted the Kansas Pacific railway company instead of the J. C. & Ft. K. railway company, and that as both companies were made defendants in the court below, such action amounted to an election to preserve the liability of the J. C. & Ft. K. railway company, which negatived the liability of the K. P. railW company. The counsel for plaintiff in error contends, that, “even if such an action could be maintained against the person assuming the debt, it could not coexist with one against the original debtor. The creditor may assume the contract made.for his benefit by the original debtor, and so take the place of the original debtor; but he cannot hold both. The new debtor does not become co-debtor with or surety for the original debtor; but if the creditor accepts the new contract, it replaces the old one, and the original debtor is released.” The question is not presented in the record as suggested by the counsel. It is true, suit was brought by Hopkins against both railway companies; but on demurrer to the evidence by the J. C. & Ft. K. railway company, the demurrer was sustained, and judgment rendered in favor of the last-named company, and thereafter, all the proceedings were had as to the K. P. railway company, as though it had not been impleaded with the J. C. & Ft. K. railway company. The claim against the latter company was abandoned; and as the case was given to the jury, the action was maintainable on *500the rule, that the promise of the K. P. railway company to the J. C. & Ft. K. railway company, made upon a valid consideration, and having been adopted by Hopkins, was to be deemed as made to him, though he was not a party, nor cognizant of it when made. Anthony v. Herman, 14 Kas. 494. In the absence of any motion to make the petition more definite, and considering all the pleadings, we do not think that the same was fatally defective in not more clearly setting forth the acceptance of the K. P. railway company in place of the J. C. & Ft. K. railway company.
The judgment will be affirmed.
All the Justices concurring.
AI-generated responses must be verified and are not legal advice.