The opinion of the court was delivered by
Johnston, J.:
This action was brought in 1885, by the board of county commissioners of the county of Sumner against the Atchison, Topeka & Santa Fé Railroad Company, the Cowley, Sumner & Fort Smith Railroad Company, and the Wichita & Southwestern Railway Company; and the petition first filed was afterward amended by adding allegations of fact, and the naming of additional defendants. In September, 1887, a third amended petition was filed, in which the Harvey County Railroad Company, the Wichita & Southwestern Railroad Company, and the board of county commissioners of Cowley county were named as defendants. Motions were made to require the plaintiff to separately state and number the causes of action contained in the petition, and to make more definite and certain the allegations embraced therein. These motions were overruled, after which a demurrer to the petition was filed by two of the defendants, alleging, among other grounds, a defect of parties defendant, the improper joinder of several causes of action, and that sufficient facts were not stated to constitute a cause of action against either of the defendants. The demurrer was overruled, and these rulings are assigned as error.
In the amended petition, it is substantially alleged that the Atchison, Topeka & Santa Fé Railroad Company, (which for *624convenience will hereafter be designated the “Atchison” company,) the Cowley, Sumner & Fort Smith Railroad Company, (which for the same reason will be referred to as the “Fort Smith” company,) the Harvey County Railroad Company and the Wichita & Southwestern Railroad Company were corporations organized, existing and doing business as such under the laws of Kansas; and that, in October, 1878, the president, vice president, treasurer and secretary of the Atchison company, each of whom was a director and shareholder in said company, together with two of its attorneys, associated themselves with six other persons and incorporated the Fort Smith Railroad Company. It is alleged that the county of Sumner subscribed to the capital stock of the Fort Smith company, and issued its bonds in the sum of $172,600 to aid in the construction of the road, receiving in exchange therefor an equal amount of the stock of the company, and that the county of Cowley, for the same purpose, subscribed to the capital stock of the company in the amount of $128,000, and issued and delivered to the company the bonds of the county in a like amount.
It is then alleged that the officers, directors and attorneys of the Atchison company heretofore named, together with those with whom they were associated, appointed themselves as the officers and directors of the Fort Smith company, and have since continued in the control of the latter company, and that in August, 1879, the Fort Smith company, at the instance of the Atchison company, mortgaged the railroad built and to be built under the charter of the Fort Smith company in the sum of $798,000 to two persons who were officers and stockholders in the Atchison company, who thereafter received from the sale of the bonds their face value, which was in amount equal to $8,000 for each mile of the road built. It is then alleged that the Fort Smith company sold the municipal bonds received from the counties of Sumner and Cowley, and received therefor the sum of $300,600, which, with the amount received from the sale of the mortgage bonds, was wrongfully turned over and placed in the treasury of the *625Atchison company. It is alleged that the cost of the road constructed by the Atchison company for the Fort Smith Railroad Company, including all of the track, buildings, bridges, etc., did not exceed the sum of $5,000 per mile, or a total cost of $480,000.
It is next alleged that the officers and directors of the Fort Smith company executed and delivered to the Atchison company 11,994 shares of its capital stock without any real consideration having been paid therefor, and that the Atchison company has never paid nor given anything of value for the stock so transferred to it. The transfer is alleged to have been made in order to enable the Atchison company to manage and control for its own benefit the business and affairs of the Fort Smith company. It is further alleged, that the bonds and stocks so paid over and transferred to the Atchison company were transferred under a pretended contract, made with the treasurer of the Atchison company, whereby the Atchison company subscribed for the capital stock of the Fort Smith company, upon the agreement to build and construct the road of the Fort Smith company, in consideration of receiving the aforementioned mortgage bonds, municipal bonds, and capital stock. It is alleged that the contract is void for the reason that it was unjust, was made by persons who were stockholders and officers of each of the contracting parties, was entered into in order that the Atchison company might absorb the receipts and earnings of the Fort Smith company, to the exclusion of the bona fide stockholders of Sumner and Cowley counties. It is next alleged that, on September 6, 1882, the Fort Smith company, the Atchison company, the Wichita & Southwestern Railroad Company, and the Harvey County Railroad Company, without the consent of the county of Sumner, entered into an agreement of consolidation, under the name of the Wichita & Southwestern Railway Company, which agreement was approved and ratified by two-thirds of the capital stock of the companies; but it is averred that the consolidation was unlawful and invalid because the officers, directors and stockholders of the Atchi*626son company owned and controlled the stock in the several companies consolidated, and that it was entered into for its own benefit.
It is next alleged that, on October 20,1885, the Wichita & Southwestern Railway Company leased the railroad, lands, buildings and other property of the consolidated company to the Atchison company, from 1883 to 1979. It is stated that the lease was made at the instance and for the benefit of the Atchison company, and that the officers of one company held similar positions in the other; and for that reason, as well as others, it is alleged that the lease was invalid; and further, that the county of Sumner had never ratified or consented to the lease, and had no notice of the making of the same until about the time of the commencement of this action. It is further averred, that in October, 1885, the Atchison company, without the consent of the county of Sumner, obtained possession of the certificates or shares of the capital stock owned by the county in the Fort Smith company, and after the Atchison company had been notified that the county of Sumner would not ratify the consolidation, and would not surrender its stock, but that it neglects and refuses to surrender and turn over to the county the certificates so wrongfully obtained and held. It is then averred that the counties of Sumner and Cowley are the only stockholders in the Fort Smith company which are bona fide, and have paid in full for the stock issued by that company; and further, that the Fort Smith company, the consolidated company, and the Atchison company, which has received the receipts and earnings of the Fort Smith company, which are large, and greatly in excess of the outlays and necessary expenses, have neglected and refused to declare any dividends upon the capital stock owned by the county of Sumner, and that there are in the hands of the Atchison company large sums of money which it is using for its own benefit, to the exclusion of the county of Sumner as a stockholder, and that the latter company refuses to make any accounting whatever with the county as a stockholder.
It is next alleged that the county of Sumner, being a bona *627fide and fully-paid-up stockholder in the Fort Smith company, is entitled to an accounting of all the earnings and profits of the Fort Smith company, and also to the complete and full possession of the railroad built and constructed under and by virtue of the charter of that company for the benefit of its bona fide stockholders, and that the issuing and delivery to the Atchison company of the capital stock of the Fort Smith company, and the consolidation of the companies, as has been stated, as well as the leasing of the consolidated roads to the Atchison company, and the obtaining of the certificates of capital stock in the Fort Smith company owned by the county of Sumner, were acts done in pursuance of a conspiracy and combination on the part of the Atchison company, and its officers, directors, and stockholders, for the purpose of enriching the Atchison company at the expense and injury of the county of Sumner, and to defeat the county from obtaining any benefit or value by reason of its investment in the stock of the Fort Smith company.
The prayer of the petition is, that the Atchison company be compelled to account for all moneys received by it as earnings, profits or otherwise from the Fort Smith company since the organization of that company; and next, that the Atchison company and Fort Smith company be compelled to account for all moneys received from the sale of the mortgage bonds issued by the Fort Smith company; and further, that it account for all the capital stock of the Fort Smith company actually sold, and for full consideration therefor at the time of the sale thereof; and further, that the Atchison company be compelled to deliver into court for cancellation all the certificates or shares of the capital stock of the Fort Smith company issued to it without consideration paid therefor; and further, that a judgment be rendered against the Wichita & Southwestern Railroad Company, the Harvey County Railroad Company, and the Wichita & Southwestern Railway Company, decreeing and declaring the articles of consolidation to be null and void so far as the road constructed under the Fort Smith company is concerned; and further, that judg*628ment be rendered against the Wichita & Southwestern Railway Company and the Atchison company, decreeing and declaring the lease made between these companies to be null and void; and finally, that the Atchison company be compelled to deliver the complete possession of the railroad built under the charter of the Fort Smith company, and all property belonging to that company, to the county of Sumner.
i Action-miscaíseshpractl0e'
3 corporate tioñni!y7toc¡cíMidei, when. The motion to separately state and number the several causes of action contained in the petition should have been allowed, and the plaintiff below should have been required to state more definitely and fully some of the matters attempted set out. As will readily appear, several causes of action are grouped and blended together in the petition, some of which are not well pleaded. The plaintiff below first asks that the Atchison company be compelled to account for the proceeds of the mortgage and municipal bonds which it is alleged were wrongfully paid over to the Atchison company. Another cause of action is to recover from the Atchison company the rents, profits and earnings of the Fort Smith railroad from the time it was built until the commencement of the action. Another cause of action against the Atchison company is stated where they ask the cancellation of 11,994 shares of the capital stock of the Fort Smith company, which it is alleged were issued and delivered to the Atchison company without consideration. The foregoing causes of action are against the Atchison company and primarily in favor of the Fort Smith company. The county of Sumner seeks relief on the ground that it is a stockholder in the Fort Smith company, and before it can maintain an action in its own name it must appear from the averments of the petition that ^ ^as *n g00^ faith but without success attempted to secure action by the officers of the corporation, Qr a demand for their action would be unavailing. There is no allegation that a demand was made upon the officers of the corporation, nor any facts stated as an excuse for omitting such demand. The next cause of action *629is to set aside the consolidation effected by the union of the Harvey County Railroad Company, the Wichita & Southwestern Railroad Company, and the Fort Smith Railroad Company, under the name of the Wichita & Southwestern Railway Company. In this cause of action no relief is sought against the Atchison company, but only against the consolidated companies which entered into the consolidation, some, of which have not been served or otherwise brought into court. Another distinct cause of action is in favor of the plaintiff below and against the consolidated company and the Atchison company, to cancel the lease of the consolidated road to the Atchison company for a term of years. Another ground of relief is asked against the Atchison company in recovering the certificates of stock in the Fort Smith company belonging to the county, which it is alleged were wrongfully obtained and withheld by the Atchison company. And finally, it is asked that the railroad constructed under the charter of the Fort Smith company, and all the property connected with that road, be delivered into the possession of the county of Sumner.
not to "be Most of these causes of action are distinct from each other, and, under the requirements of the code, should have been separately stated and numbered. They are not only separate aud distinct as to the subject-matter set out and the relief sought, but some of the parties named as defendants, and who are interested in one or more of the causes of action, have no interest or concern whatever in others. Neither the Harvey County Railroad Company nor the Wichita & Southwestern Railroad Company is interested in the causes stated for the cancellation of the stock in the Fort Smith company alleged to have been wrongfully obtained by the Atchison company; nor have they any interest in the branch of the ease in which the plaintiff asks to recover the proceeds of the municipal and mortgage bonds alleged to have been wrongfully paid to the Atchison company. And they have no interest in the action for the recovery of the earnings of the Fort Smith road from its *630construction until the time of the consolidation. Several of the parties are not interested in the demand for the recovery of the certificates of stock in the Fort Smith company belonging to the county, which it is charged were wrongfully obtained and are now withheld by the Atchison company. The Atchison company is not one of the consolidating companies, and that company is not interested in the cause of action to secure the annulment of the consolidation.
*631
4. Corporations — consolidation — action to try validity, by whom brought.
*630Treating the allegations of the petition as though they had been separately stated and numbered, as we may (Stewart v. Balderston, 10 Kas. 131), we will examine the first ground of .demurrer insisted upon, namely, that several causes of action are improperly joined. Those in favor of the Fort Smith company against the Atchison company cannot be properly united with causes in favor of Sumner county against the consolidated company aud the companies from which it was formed. Neither can the cause in favor of the county against the Atchison company and the consolidated company to annul the lease be joined with the one to declare void the consolidation. We have seen that some of these causes affect parties that are not concerned in other causes which have been stated, and, as said in Lindh v. Crowley, 26 Kas. 47, “It will not do to unite in one pleading a cause of action against two or more with a cause of action against a part of the defendants only.” See, also, Haskell County Bank v. Bank of Santa Fé, ante, p. 39. Indeed, it would seem from what is shown in the record that the action to aunul the consolidation should be brought by the attorney general in the name of the state. In some of the allegations and arguments in behalf of the county, the continued existence of the Fort Smith company is claimed, while in others the extinguishment of the corporation by the organization of the consolidation is assumed. If consolidation has been successfully accomplished, the Fort Smith and other constituent companies no longer exist, and the plaintiff below must obtain its rights as a stockholder against the consolidated company. Even if the proceedings were irregular or wrongful in some respects, the intelligent acquiescence or ratification of *631the stockholders in such a consolidation would make it good and bind the stockholders. It would seem that the first and most important step in this litigation should have been the determination of the validity of the consolidation, and if it is set aside, then some of the relief sought by the plaintiff below might be obtained. On the other hand, if it should be upheld as against the complaining stockholders, they would be concluded on several of the matters that are the subjects of complaint. Ordinarily the original or consolidated charter of a corporation should be attacked only at the instance of a public officer and in the name of the state. Cases may arise where such an action can be maintained at the instance of a constituent company, or a stockholder of the same, where the consolidation is void, and the officer whose province it is to bring such an action refuses to act; but it is not charged that the attorney general or county attorney had refused to institute an action to establish the invalidity or nonexistence of the corporation attempted to be created by the consolidation. It is conceded that the forms prescribed by the statute for the consolidation of railway companies have been observed in organizing the consolidated company. The articles of agreement have been filed with the secretary of state, and ever since that time, and for more than 10 years, the companies so organized have been exercising corporate powers, and had been assuming to be and to act as a corporation for more than five years before the amended petition was filed. In such a case a proceeding to inquire into the validity of the consolidation and have it annulled should be brought in the name of the state by the proper prosecuting officer. (C. K. & W. Rld. Co. v. Comm’rs of Stafford, Co., 36 Kas. 128; In re Short, Petitioner, 47 id. 250, and cases cited; Bell v. Railroad Co., 10 Atl. Rep. 741; Terhune v. Potts, 47 N. J. L. 218; Rice v. National Bank, 126 Mass. 303.)
Several other questions are suggested in the briefs of counsel, but they cannot be properly or satisfactorily determined until the petition and pleadings have been reformed and cor*632rected. For the reasons stated, the judgment of the district court will be reversed, and the cause remanded for further proceedings.
All the Justices concurring.