The opinion of the court was delivered by
Valentine, J.:
This was an action brought in Lyon county by the board of county commissioners of Barton county against P. B. Plumb and W. T. Soden on a certain penal bond executed by them. The petition below sets forth and alleges among other things the following facts: Said bond was executed by John McDonald as principal, and P. B. Plumb and W. T. Soden as sureties, and bound said McDonald, Plumb, and Soden unto said county of Barton in the penal sum of fifty thousand dollars, to be void however upon the condition that said McDonald should comply with all the terms of a certain written contract previously entered into between him and said board of county commissioners, whereby he agreed, for the consideration of $24,200 to furnish all the material and build a certain court-house within a certain time in said county of Barton. The petition also alleges that the county on its part complied with all the terms and conditions of said bond and said contract, but that McDonald did not comply on his part with all the terms of said contract. In great detail it alleges that he did not complete said building within the time agreed upon by the parties, nor at any other time; that he did not furnish sufficient material therefor, and that, although he furnished some of the material therefor, and did some of the work thereon, yet, that said material and said work were of an inferior quality, and were not such as were required by the terms of said written contract. The petition also alleges certain other facts tending to show the amount of *149the damages which resulted to the plaintiff from the noncompliance of McDonald with said contract, and then asks for a judgment for the plaintiff for $12,000 damages, and costs of suit. The defendants moved “the court to require the plaintiff to separately state and number the several causes of action contained in the plaintiff’s petition” — but they did not state or show how many or what causes of action they claimed were contained in the plaintiff’s petition. The court sustained this motion; but the court was equally silent as to the number or kinds of causes of action it considered were contained in plaintiff’s petition. The plaintiff failed to amend said petition in any manner whatever, and for that reason the court dismissed the action. The plaintiff assigns said rulings of the court below as error.
If the petition did in fact state more than one cause of action, as is claimed by the defendants, then the rulings of the court below were correct; but if it really stated only one cause of action, as is claimed by the plaintiff, then said rulings of the court below were evidently erroneous. We think the petition really stated only one cause of action. Houston v. Delahay, 14 Kas. 125, 130. (See also as throwing some light upon this question, the following cases, to-wit: Hibbard v. McKindley, 28 Ill. 240; State v. Davis, 35 Mo. 406; Fisk v. Tank, 12 Wis. 276, 298, 299; Roehing v. Huebschman, 34 Wis. 185, 187; Smith v. B. C. & M. Rld., 36 N. H. 458, 484; K. C. Hotel Co. v. Sigement, 53 Mo. 176, 177.) The defendants by executing the penal bond set forth in the petition, agreed and guaranteed in substance, that McDonald should build said court-house as he agreed to do; but McDonald failed. And this is what constitutes the plaintiff’s cause of action, and we think it constitutes only one cause of action. It is true, that McDonald did not wholly fail. He built a court-house or a part of a court-house; but he did not build the kind and quality of court-house which the parties agreed should be built; and evidently, his partial failure to build said court-house, his failure in some of the innumerable particulars in building the same, would not constitute a greater *150number of causes of action than a total failure to build such court-house, a total failure in every particular. Even if this action should be governed by the same principles which would govern in an action brought by the plaintiff against McDonald on his original contract to build said court-house, we would still think that the same result would follow, and that the facts of the case would constitute only one cause of action. McDonald simply agreed that on or before the 25th of December 1873 he would furnish to the plaintiff, and at Great Bend, a certain bind and quality of court-house, completed and finished. He did not agree that he would furnish materials, as materials, or labor, as labor. All that he agreed to do with reference to furnishing materials or labor was that he would furnish them in a eourt-house, and as apart of the court-house. Under said contract it was his legal duty to furnish said materials and labor in said court-house, and not otherwise; and the plaintiff had a legal right to receive them in such court-house, and not in any other manner. That is, it was the legal duty of McDonald to furnish to the plaintiff said court-house as he agreed to do, and the plaintiff had a legal right to so require it. McDonald violated this right by not so furnishing said eourt-house. And this is just what constitutes the plaintiff’s cause of action against McDonald on said contract. That is, the plaintiff’s cause of action is founded on the right of the plaintiff to receive said court-house from McDonald according to said contract, and the violation of such right by McDonald. The failure on the part of McDonald to furnish materials or labor was no violation of any right of the plaintiff except as he failed to furnish them in the building and as apart thereof. The materials and labor when furnished would not belong to the plaintiff until they were put into the building. Prior to that time they would belong to McDonald. He could bring materials onto the ground, and then take them away again if he chose. He could put them into the building, or not, just as he chose. And after completing the building, (if he had done so,) he could take away all the materials not used in the construction *151of the building. The plaintiff never did own nor could own under said contract any part of the materials furnished by McDonald, except as it owned them as parts and portions of said court-house building. From the foregoing it will be seen that the plaintiff possessed one grand primary right, and only one such right, and that that right was to have a good court-house built according to said contract. Within this-grand primary right, however, there existed innumerable subordinate and secondary rights. These subordinate and secondary rights reached to all the illimitable details in the construction of said building. Thus, the plaintiff had a right to have every brick of proper quality, and put into the building in a proper manner. So also with respect to every piece of lumber, pane of glass, nail, lock, hinge, etc. Now each of these innumerable subordinate rights might be violated, and the violation of any one of them would constitute a cause of action. Thus, if McDonald had put a broken or crooked pane of glass into a window, instead of putting in a good one, or had not puttied it in well, the plaintiff would have had a cause of action against him for the resulting damages. The same thing may be said with respect to putting a brick in the wall, or a piece of tin on the roof, or a board in the floor. And so on through all the limitless details in constructing the building. But the violation of each-of these special and subordinate rights is also a violation of the more general and primary right, and altogether they constitute only one violation of this grand primary right. Now as the violation of any one of these subordinate rights would constitute a cause of action, it might seem that the violation of a hundred or a thousand of such subordinate rights would constitute a hundred or a thousand separate and distinct-causes of action. But such is not the case, or at most it is rarely the case. Possibly the plaintiff might in some cases be allowed to elect whether he would treat the several violations of his several subordinate rights as separate and distinct causes of action, or as only one cause of action, but generally he would not be allowed to do so. Generally he would not *152be allowed to split up into several causes of action what he might prosecute as only one cause of action. In the present case we think that all the violations of the plaintiff’s subordinate rights under said contract really constitute only one general violation of its general and primary right under said contract, and therefore that all of such violations really constitute only one cause of action. All of said violations taken to gether were merely a violation of the plaintiff’s general right to have said court-house built according to contract. McDonald was to be paid $24,200 in installments, upon estimates made as the work progressed; but it was expressly stipulated that “no payment or estimate shall be considered as acceptance of all or any part of the work; and no acceptance shall be conclusive and final until the entire completion and acceptance of the worJc.” When McDonald abandoned the work, on 20th January 1874, the plaintiff’s cause of action was complete. The fact that the plaintiff afterward proceeded with the work, and completed the building, did not give to the plaintiff another or an additional cause of action. The necessary cost of completing the building may however be shown in the case for the purpose of measuring the plaintiff’s damages.
There are several other facts alleged in the plaintiff’s petition, which do not go to make up or constitute the plaintiff’s cause of action, but are alleged merely for the purpose of giving a measure for the plaintiff’s damages, or special damages which have resulted from wrongs constituting the plaintiff’s cause of action.
The judgment of the court below will be reversed, and cause remanded with the order that said order of dismissal, and said order requiring the plaintiff to separately state and number the several causes of action contained in the plaintiff’s petition, be set aside, and that further proceedings be had in the case in accordance with this opinion.
All the Justices concurring.