
185 Kan. 317 (1959)
342 P.2d 186
FRANK A. DUGGER, Appellant,
v.
STATE HIGHWAY COMMISSION OF THE STATE OF KANSAS and the CITY OF MANKATO, KANSAS, Appellees.
No. 41,503
Supreme Court of Kansas.
Opinion filed July 10, 1959.
Paul L. Aylward, of Ellsworth, argued the cause, and Lester M. Goodell, Gerald L. Goodell, and Raymond Briman, all of Topeka, and George D. Miner, of Ellsworth, were with him on the briefs for the appellant.
Constance M. Achterberg, of Topeka, argued the cause, and W. B. Kirkpatrick, assistant attorney general, was with her on the briefs for the appellee, state highway commission.
The opinion of the court was delivered by
ROBB, J.:
This is an appeal in an action seeking a money judgment by an appellant landowner from the trial court's order sustaining the state highway commission's demurrer to his petition for the reason that the court had no jurisdiction of the subject of the action and the petition did not state facts sufficient to constitute a cause of action.
We are not concerned herein with the landowner's action against the city of Mankato because that matter has been removed by order of the trial court sustaining the city's motion, on special appearance, to quash service of summons, which was not objected to by the landowner and no appeal has been taken therefrom.
After identifying the parties, describing the landowner's property, and showing the eminent domain proceeding by the city to condemn a corner of that property, with which we are not here concerned, the petition reads:

*318 "2. That thereafter representatives of the State Highway Commission of the State of Kansas, and contractors of the State Highway Commission commenced work on improving U.S. Highway 36 along South Street by changing the grade thereof and making fills and cuts therein, and repairing, and curb and guttering said South Street.
"3. That prior thereto by City Ordinance No. 280, passed June 3, 1927, the City of Mankato, Kansas, the grade of said South Street had been established and remained without change for some 30 years thereafter, and was considered by all property owners on South Street and the City of Mankato to be the established grade for said South Street. That subsequent to the 4th day of May, 1957, in accordance with plans and specifications of the State Highway Commission for the improvement, widening and altering of said South Street and U.S. Highway 36 aforesaid, the contractors, without any statutory proceeding by the City of Mankato, to change the grade and without acquiring the right from the adjoining property owners, to change the grade, did excavate portions thereof and fill in portions thereof, from a point being approximately the northwest corner of Block One, Bishop's Addition to the City limits of Mankato, Kansas, raising the grade of South Street as much as 5 to 6 feet at places, and lowering the grade as much as 4 to 5 feet in places, the exact measurements the plaintiff is unable to state; and immediately in front of the property of the plaintiff the grade of said Highway and South Street was raised from 1 to 6 feet in height; that the change in said grade and raising thereof, severely impaired the ingress and egress therefrom plaintiff's property, and subjected the office building, residence building and tourist court buildings on the property of the plaintiff above described, to flooding in the summer of 1957 from drainage of water changed thereby, and that during the construction thereof, by reason of the change in drainage and the change of grade aforesaid resulting from deposit of earth along the plaintiff's property, water was impounded thereon so as to flood the basement and home of the plaintiff and the floors in buildings of several of the cabins thereon.
"4. That in addition thereto, in connection with such improvement, the representatives of the State Highway Commission, its agents and employees, entered upon a strip of land approximately 15 feet wide, the exact measurement plaintiff is unable to state, upon the south line of the above described property and entered into possession thereof, and removed structures thereon, and deposited earth thereon, and appropriated the same for the right of way of said U.S. Highway 36 along South Street by staking out said right of way upon the private property of the plaintiff; that neither the City of Mankato, Kansas, nor the State of Kansas has acquired, or owns any portion of the strip taken from plaintiff's property for highway use."
The foregoing was followed by allegations of damages not now involved.
The commission lodged its demurrer attacking the petition on the two grounds above stated. The trial court sustained the demurrer on both grounds and the landowner has appealed.
Here again we have a demurrer testing the sufficiency of a petition *319 under G.S. 1949, 60-705, First, Fifth, which invokes certain oftrepeated rules. When a general demurrer is lodged against a petition the pleading is to be liberally construed in favor of the pleader (Trimble v. Spears, 182 Kan. 406, 320 P.2d 1029); all well-pleaded allegations are admitted (Farran v. Peterson, Administrator, No. 40,936, 185 Kan. 154, 342 P.2d 180, this day decided) and taken as true; the pleader is entitled to all favorable inferences that may be drawn from the facts pleaded (Merchant v. Foreman, 182 Kan. 550, 322 P.2d 740). Also, where a petition sufficiently alleges a cause of action on any theory, a general demurrer thereto cannot be sustained. (Richey v. Darling, 183 Kan. 642, 331 P.2d 281.) In this connection we have further held that in testing the sufficiency of a pleading, we consider only the allegations thereof. (Clark Lumber Co. v. Passig, 184 Kan. 667, 668, 339 P.2d 280.)
The commission frankly states no question of venue was presented to the trial court and we therefore will not consider it in this appeal. This is supported by the rule that we do not consider matters which have not previously been presented to the trial court. (In re Estate of Cramer, 183 Kan. 808, 816, 332 P.2d 554.)
The next question is whether the trial court had jurisdiction over the subject of the action. The commission claims that under the general condemnation law of eminent domain (G.S. 1949, 26-101) and the statute determining jurisdiction of actions in rem (G.S. 1949, 60-501) the trial court lacked jurisdiction. Since this is not an eminent domain proceeding, we need not discuss 26-101. With regard to 60-501, two recent decisions of this court draw a definite line of distinction on the question of jurisdiction. The first is Suits v. Mobil Crude Purchasing Co., 182 Kan. 310, 313, 321 P.2d 167, an action brought in McPherson county concerning oil runs from real estate located in Butler county, and it was there held the trial court had no jurisdiction over the subject of the action because it was for the recovery of an interest created by an oil, gas or mineral lease; for the determination in some form of such right or interest; and to bar the appellees from any right or interest therein. The second case is Schindler v. Ross, 182 Kan. 277, 283, 320 P.2d 813, where it was in substance said that 60-501 cannot be construed as having application to an action  such as the one there involved  on implied contract to recover money paid under an oil and gas division order through mistake of fact where there is no dispute between the parties participating in the execution of that instrument as to their *320 respective interests under its terms and provisions. (Emphasis supplied.) Since the highway construction in our present case is completed and there can be no dispute between the parties as to their respective interests in the real property or the rights appurtenant thereto, we think the language of the Schindler case is conclusive on the point. Further, in an injunction suit (Provident Mut. Life Ins. Co. v. State Highway Comm., 155 Kan. 351, 355, 125 P.2d 346) this court reversed the trial court's order sustaining a demurrer to the insurance company's petition and stated as follows:
"Were we to grant the specific relief prayed for, the effect would be to close the state highway until such time as the commission could exercise its right of eminent domain, where the only issue would be the amount of the award. In our judgment it is in the public interest no injunction should be granted, but that the cause should be remanded to the trial court in order that it may hear the evidence pertaining thereto and award to the company and against the commission such sum as the company is justly entitled to under the facts and circumstances." (p. 355.)
See, also, Franks v. State Highway Commission, 182 Kan. 131, 319 P.2d 535, where another highway improvement project was sought to be enjoined and the result was the same as that in Provident Mut. Life Ins. Co. v. State Highway Comm., supra.
This is an action ab initio for recovery of money because the landowner has lost property or rights therein (which he allegedly originally owned and possessed) by reason of the highway development above set out and thus there can be no issue of his and the commission's respective interests in the land. Therefore, the rule in the Schindler case is controlling. Here, the Shawnee district court had jurisdiction over the subject matter just as it did in the above-cited life insurance company case where the land in question was located in Atchison county.
The other ground of the demurrer  that the petition failed to allege a cause of action against the commission  is argued on the basis that the city of Mankato was the only authority that had the power of eminent domain to condemn for the improvement of its city street as a connecting link in the state highway in question.
The petition alleged that prior to January 29, 1957, the commission and the city of Mankato entered into an agreement, the details thereof not being known to plaintiff, for the project here involved and included were those matters alleged in the above-quoted portions of the petition. Such an arrangement for connecting links in certain cities of the third class is within the power of the commission *321 (G.S. 1949, 68-412; 68-412a) and it exercised that power not only by entering into the agreement of January 29, 1957, but also by carrying the project to completion.
We agree with the commission that it has no power to enter a city of the third class with a population of more than 500 (Strain v. Cities Service Gas Co., 148 Kan. 393, 396, 83 P.2d 124) which is the particular kind of city with which we are here concerned and nothing said herein is to be applied to any other municipality by implication so as to extend or diminish any of the commission's power to institute eminent domain proceedings for condemnation of property or rights therein without the cooperation of that city. However, once the commission has exercised the power granted to it under G.S. 1949, 68-412 and 68-412a, we believe that it must then answer in damages to a landowner whose property and rights therein have been lost by the combined and cooperative efforts of the commission in such a project as is here presented. Where the commission has appropriated land or rights therein for state highway purposes without having obtained the title thereto, by formal condemnation or otherwise, the landowner may waive formal condemnation and may sue upon an implied contract for the value of the property taken. This is substantially the rule stated in State Highway Comm. v. Puskarich, 148 Kan. 388, 83 P.2d 132, which was cited with approval in the subsequent case of Atchison v. State Highway Comm., 161 Kan. 661, 663, 171 P.2d 287.
The question of the difference between the phrases, a "state highway system" and "a state system of highways" was well-settled in State, ex rel., v. State Commission of Revenue and Taxation, 163 Kan. 240, 181 P.2d 532, and we are not inclined to cover the subject again.
We have noted, not overlooked, other interesting arguments and authorities cited by the parties but a discussion of them would only extend the opinion and would not be determinative of the problems here involved.
Applying the general rules respecting consideration of the sufficiency of a pleading when it is attacked by a demurrer, we conclude the trial court had jurisdiction over the subject of the action and that a cause of action was sufficiently alleged. The result is the trial court erred in sustaining the demurrer on those grounds.
Reversed.
