
    DECEMBER TERM, 1881.
    The Pueblo & Arkansas Valley Railroad Company v. Taylor et al.
    1. As a general rule, whenever a contract conflicts with the morals of the times and contravenes any established interest of society, it is void as being against public policy.
    2. Railroad companies held to be quasi public corporations and agencies, their directors acting in the double capacity as agents for the companies and as trustees for the public. When the public interests axe brought in conflict with the private interests of the company, or of private individuals with whom such companies deal, such private interests must yield to those of the public.
    3. The public has a right to say that such companies shall not be permitted to make any contract which would prevent them from accommodating the public, when entitled to it, in the matter of transportation and travel.
    4. It is a general rule of the law of contracts, that if the consideration, or any part of it, is illegal, no promise based upon such illegal consideration can be enforced. But if one gives a good and valid consideration, and thereupon another promises to do two things, one legal and the other illegal, he shall be held to do that which is legal, unless the two are so bound together that they cannot be separated, in which case the whole promise is void.
    5. A contract is to be considered by reference to all its parts and provisions, and the nature of the transaction which forms its subject matter. No particular form of words is necessary to constitute a covenant.
    6. No court will lend its aid to one who founds his cause of action upon an illegal or immoral act.
    
      
      Error to District Court of Pueblo County.
    
    The case is stated in the opinion.
    Messrs. Thatcher and Gast, for plaintiff in error.
    Mr. John O. Fitnam and Messrs. Wells, Smith and Macon, for defendants in error.
   Stone, J.

The questions presented in this case arise upon demurrer to the plaintiff’s complaint. Suit was brought to recover the penalty of a bond executed by the defendants to plaintiff. The complaint, in which the bond is fully set out, is as follows:

“ The plaintiff, the Pueblo & Arkansas Valley Eailroad Company, a corporation created, organized and existing under and by virtue of the laws of the state of Colorado, having its principal office and place of business at the city of Pueblo, Colorado, complains of the defendants, Daniel L. Taylor, Joseph Davis, O. P. Treat, Plenry N. Jaffa, J. O. Packer and P. J. Munnicum, and alleges:
1. That on, to wit, the 8th day of April, A. D. 1878, the defendants signed, sealed and delivered to the plaintiff their certain bond or writing obligatory, of which the following is a copy:
“Enow all men by these presents, that we, Daniel L. Taylor, Peter J. Munnicum, 'Joseph Dávis, John O. Packer, Henry N. Jaffa, Charles P. Treat, of the county of Las Animas, state of Colorado, are held and firmly bound unto the Pueblo & Arkansas Valley Eailroad Company, a corporation organized and existing under the laws of the state of Colorado, in the penal sum of $25,000, lawful money of the United States, to be paid to the said Pueblo & Arkansas Valley Eailroad Company, or to its certain attorney, successor or assigns, to which payment well and truly to be made, we do bind ourselves, our heirs, executors, administrators, and every one of them, firmly ,by these presents. Sealed with our seals, and dated tho 3th day of April, A. D. 1878.
Whereas, the said Pueblo & Arkansas Valley Railroad Company are constructing an extension of its broad gauge line to extend from La Junta to the town of Trinidad, in the state of Colorado, or to a point adjacent thereto; now, therefore, the condition of this obligation is such, that provided the said Pueblo & Arkansas Valley Railroad Company completes the construction of its said broad gauge line of railroad from La Junta to the town of Trinidad aforesaid, or to some point adjacent thereto, on or before the 1st day of February, 18J9, the obligors herein promise or agree to do and perform the following things, that is to say:
1st. We will at our own cost and charges make, execute and acknowledge, or cause to be made, executed or acknowledged, all and every such act or acts, deed or deeds, conveyance or conveyances, or condemnations whatever, which shall be needful or necessary for conveying, assuring, establishing and confirming unto the said Pueblo & Arkansas Valley Railroad Company, clear of all incumbrances, its right of way, fifty feet on each side of the center line of the track as the same may be located from La Junta to and through the town of Trinidad, the intention hereby being that the right of way aforesaid shall be procured and confirmed unto the said company at our own expense, cost and charge.
“ 2d. We will pay, or cause to be paid, one-half of any and all taxes that may be levied or assessed against any and all of the property of the said Pueblo & Arkansas Valley Railroad Company, or any lessee of the same line, including the right of way, road-bed, bridges, culverts, rolling stock, depots, stations, grounds, buildings and all other property, real and personal, belonging to, appurtenant, or used in operating that part of the line from the northern boundary of the said Las Animas county to and through the county of Trinidad aforesaid; and in estimating the same for road-bed, right of way, rolling stock and equipments, the proportion which the number of miles of the said railroad from the northern boundary of the said Las Animas county to and through the town of Trinidad bears to the whole number of miles of the said railroad situate within said county of Las Animas, shall control.
“ This covenant shall continue to be in force as to all taxes whatever levied or assessed against the said railroad company, or any lessee of its line’ as aforesaid, during the years 1879, 1880, 1881, 1882 and 1883; provided, however, that the total liabilities of the obligors herein for their proportionate share of the taxes hereby assumed shall for no single year exceed the sum of $2,500.
“3d. We will at our own cost and charges procure for the said railroad company by good and sufficient deed or deeds, conveyance or conveyances or condemnations, an absolute, indefeasible title in fee to forty acres of land for depot grounds, station purposes and machine shops, the same to consist of a strip of land four hundred feet in width and from two .thousand to twenty-five hundred feet in length, and the remainder of said forty acres to be in compact form adjacent thereto, the whole in a form to be approved by the chief engineer of said company, and to be situated on either what is commonly known as the ‘Baca and Chacon5 tract, to wit: The east half of the northeast quarter of section 13, township 33, range 64, and the northwest quarter of section 18, and the south half of the southwest quarter of section 7, township 33, range 63; or on the ‘Terry’ tract, to wit: The southwest quarter of the northeast quarter, the northwest quarter of the southeast quarter, and the north half of the southwest quarter of section 13, township 33, range 64, at the election of a majority of the obligors herein in writing expressed.
“It being expressly understood that the more particular location of said depot grounds on any portion of either of the aforesaid tracts is left to the exclusive control and judgment of the chief engineer of the said company.
££4th. We will purchase for the said company three hundred and twenty acres of mineral land, adjacent to the line of its road as the same is located through the Raton Pass, and to be selected by the chief engineer of said company in subdivisions of forty acres from any or all of sections 11, 12, 13 and 14, township 34, range 64. We will cause to be executed and acknowledged such deed or deeds, or conveyances, as may be necessary to confirm unto the said company a good, absolute, indefeasible title in fee simple to the said three hundred and twenty acres of mineral land as the same may be selected. If purchased from the government of the United States, the same to be paid for as mineral land. The title shall within four months be vested in Charles P. Treat, trustee, and to be conveyed by the said trustee to the company aforesaid upon the completion of the said railroad to the town of Trinidad within the time herein specified, to wit: on or before the 1st day of February, 1819. In case of the non-performance of any of the conditions and undertakings in the third and fourth covenants, or either of them, of this obligation required and promised tb .be done, and because the damages incident thereto are not measurable by any exact pecuniary standard, the obligors herein agree to forfeit and pay the sum of $8,000, as stipulated damages for such default.
££If the above bounden obligors, their heirs, executors and administrators, shall do and in all things well and truly observe, perform, fulfil, and keep all and singular the covenants, grants, articles, clauses, provisos and conditions which on the part of the said obligors are or ought to be observed, performed and fulfilled, or if the said railroad company shall fail to keep'and maintain its principal place of business for the county of Las Animas in the town of Trinidad aforesaid, or if the said railroad company shall fail to keep its repair and machine shops, if built in the county of Las Animas, within one mile of the city limits of the town of Trinidad, or if the said railroad company shall at any time during the continuance of this obligation build a. side track to its main line in the town of El Moro, state of Colorado, then this obligation to be void, otherwise to be in full force and effect.
(Signed) “ Joseph Davis, [seal.]
“C. P. Treat, [seal.]
Henry N. Jaffa, [seal.] “J. O. Packer, [seal.]
“Dan’lL. Taylor, [seal.]
,“P. J. Munnicum. [seal.]
“2. That the plaintiff did construct its broad gauge line of railroad from La Junta to the town of Trinidad aforesaid before the 1st day of February, 1879, and in all things has duly performed the conditions on its part.
“ 3. That the defendants have not paid the proportion of taxes agreed by them to be paid upon that portion of the plaintiff’s railroad extending from the northern boundary line of Las Animas county aforesaid to and through the town of Trinidad; but the same, or any part thereof, have wholly refused to pay. Plaintiff says that on the 31st day of December, 1879, it paid to the treasurer of Las Animas county the sum of eleven thousand two hundred and eighty-four dollars and twenty-three cents ($11,284.23), the same being the amount due and then owing by the plaintiff on account of taxes assessed and levied against the property of the plaintiff situate within the county aforesaid for the year 1879. That the entire number of miles of plaintiff’s railroad within the county aforesaid is sixty and ninety one-hundtfedth miles, and the entire number of miles from the northern boundary line of said county to and through the town of Trinidad is forty-six and forty-two hundredths; whereby the defendants became and are liable to pay the plaintiff the sum of $2,500 with lawful interest from the said 31st day of December, 1879.
“4. For a second and further breach of the conditions of the said bond, plaintiff says that, at the time of the execution of said bond, it caused to be selected by its chief engineer the following mineral lands adjacent to its line of road in Raton Pass, in the county aforesaid, to wit: the northwest quarter (N. W. J) of section twelve (12), and the southeast quarter (S. E. J-) of section eleven (11), township thirty-four (31) south, of range sixty-four (61) west, consisting of three hundred and twenty acres, and duly notified the defendants of its selection aforesaid. Plaintiff is informed and believes that the defendants thereupon caused the title to the said lands to be procured and patented from the government of the United States. Plaintiff states, however, that the defendants have failed to invest the plaintiff with, or confirm unto it, a good, absolute, indefeasible title in fee simple to the said three hundred and twenty acres of land, or any title whatever to the whole or any part thereof, but the same have wholly refused to do; whereby the plaintiff has suffered damages in the sum of $8,000.
“Wherefore plaintiff demands judgment on account of the first breach of the said bond assigned, for the sum of $2,500 and interest from the 31st day of December, 1879; and on account of the second breach assigned, for the sum of $8,000 and costs of suit.
Thatcher & Cast,
Attorneys for Plaintiff

The demurrer, the' general grounds of which are that the facts stated do not constitute a sufficient and legal cause of action, was sustained by the court below, and judgment entered thereon, plaintiff electing to stand by the complaint; and error is assigned upon the ruling and judgment accordingly.

Several objections are made and argued by counsel for the defendants against the validity of the contract, but we need consider only that one which we regard as decisive of the case.

It is contended by the defendants that the condition providing that the railroad company were not to build a side track at the town of El Moro was illegal, and therefore vitiated the contract, and no recovery can in. consequence be had upon the bond for non-performance on the part of defendants. On the other hand it is contended that, even if this condition is void, a recovery can, nevertheless, be had upon the other conditions which are good.

We are thus led to examine whether, first, the condition in question is valid and binding; and second, whether, if invalid, it so far impairs the entire contract as to preclude a recovery upon the bond.

The first of these questions is an important one, but is not without precedent. Cases involving the same principle have received the careful consideration of numerous courts, and upon settled authority this agreement or condition not to build the side track in question must be pronounced illegal as against public policy. Precisely what public policy is in any given case may frequently be a matter of contention, and its application a subject of dispute. The strict meaning of the expression “has never,” says Mr. Story, in his work on Contracts (sec. 546), “been defined by the courts, but has been left loose and free of definition, in the same manner as fraud. This rule, however, may be safely laid down: that whenever any contract conflicts with the morals of the times, and contravenes any established interest of society, it is void as being against public policy.”

Railroad companies are held to be quasi public corporations and agencies, their directors acting in the double capacity as agents for the company and as trustees for the public, clothed with an important public trust. These roads subserve public purposes to such an extent that the public may impose upon itself the burden of taxation to aid in their construction (St. J. & D. Q. R. R. v. Ryan, 11 Kan. 608), and the lawful exercise of the right of eminent domain in the taking of private property for the purpose of their construction, is put solely upon the ground of public use. When, therefore, the public interests are brought in conflict with the private interests of the company, or of private individuals with whom such companies deal, such private interests must yield to those of the public. It logically follows that the public has a right to say that such companies shall not be permitted to make any contract which would prevent them from accommodating the public, where entitled to it, in the matter of transportation and travel.

In the case of St. Joseph & Denver City R. R. Co. v. Ryan, 11 Kan. 609, which arose upon a contract containing. a stipulation that the railroad company would not have or use any other depot within three miles of the depot agreed to be established by the contract, the court say: “Railroad companies are, as we have seen, public agencies, and perform a public duty. They are agencies created by the public, with certain privileges, and subject to certain obligations. A contract that they will not discharge, or by which they cannot discharge those obligations, is a breach of that public duty, and cannot be enforced. They are under obligations to use the utmost human foresight and sagacity in the construction of their roads to prevent accidents thereon. A contract that they will not use such sagacity and foresight certainly could not be upheld. They are under obligations to employ skillful and competent engineers to manage their engines, and other competent employees to superintend and take care of the running of their trains. A contract that they will not employ such agents and servants is certainly void. They are bound to furnish reasonable facilities for the transportation of freight and passengers, both as to quantity and quality of cars and coaches, and the number of trains, and a contract not to furnish such facilities will not be tolerated. * * * Upon the same principle it is the duty of a railroad company to furnish reasonable depot facilities. The number and location of the depots so as to constitute reasonable depot facilities vary with the changes and amount of population and business. A contract to leave a certain distance along the line of the road destitute of depots is in conti’avention of this duty.”

In addition to the foregoing, the same doctrine is laid down in the following among other cases: Marsh v. F. P. & N. W. R. R. Co. 64 Ill. 415; St. L. J. & Chi. R. R. Co. v. Mathers, 71 Ill. 593; Pacific R. R. Co. v. Seeley, 45 Mo. 212; Fuller v. Dame, 18 Pick. 472; Holliday v. Patterson, 5 Oregon, 177; Pierce on Railroads, p. 513.

Upon both principle and authority, we think it beyond serious question that the condition in this contract, whereby it was sought to prevent a neighboring town through which the railroad passed from having the facilities of even a side track, and to prevent the railroad company from the exercise of discretion in providing such facilities for the public, is illegal and void, by reason of its clear contravention of the public interests, and the 'duty of such company in their relations to the public.

Secondly: Does this void condition, which was one to be performed by the plaintiff, operate to prevent a recovery against the defendants upon breach of the conditions to be performed by the latter?

This question depends upon whether the void condition was any part of the consideration for the undertaking of the defendants; and if, being such, whether it can be regarded as so far an independent promise as to be separable both as a x>romise on the one side and as a consideration on the other side; for it is a general rule of the law of contracts, that if the consideration, or any part of it, is illegal, no promise based upon such illegal consideration can be enforced. Bishop on Contracts, sec. 471; 1 Parsons on Contracts, secs. 11 and 12; 2 Chitty on Contracts (11th ed.), p. 973.

It is contended by counsel for plaintiff that “ the bond contains no promise to that effect ” (not to build a side track at El Moro), “to be performed by the plaintiff; the language is that of a condition, upon the violation of which the liability of the defendants is to cease. For a good and lawful consideration the defendants covenanted to do certain things, which made a contract complete in itself, but, for their own protection during the future lifetime of the obligation, they impose upon the plaintiff certain conditions, and say that when these happen their undertaking is to be canceled.” This argument is plausible, and might perhaps be regarded sound if we could say that this condition did not constitute a part of the consideration for the covenant of the defendants. It is true that there are many cases where, when a contract is for the doing of two or more things which are entirely distinct, and one of them is prohibited by law and the other legal, such illegality of the one stipulation cannot be set up as a bar to an action for a breach of one of the valid stipulations. Such a case is that of the Eric Railway Co. v. Union L. E. Co. 35 N. J. L. 240, which is cited by counsel for plaintiff; but there the suit was for a breach of the good promises only, which were made upon a good consideration, and which were so distinct from the illegal promises as to be severable.

A distinction must be taken between the cases in which the consideration is illegal in part, and those in which the promises founded on the consideration are illegal in part.

“If any part of a consideration is illegal the whole consideration is void, because public policy will not permit a party to enforce a promise which he has obtained by an illegal act, or an illegal promise, although he may have connected with this act or promise one which is legal. But if one gives a good and valid consideration, and thereupon another promises to do two things, one legal and the other illegal, he shall be held to do that which is legal, unless the two are so mingled and bound, together that they cannot be separated; in which case the whole promise is void.” 1 Parsons on Contracts, *45T.

Now, in the case before us, the contract is made up of mutual promises by the plaintiff on the one side and the defendants on the other. In all such cases the promises on each side become the consideration respectively for the promises on the opposite side. True, the void condition in this case is not expressed to be a promise on the part of plaintiff, nor a consideration moving to the defendants, but such promise and consideration is certainly implied when we take into view the entire contract, the nature of the transaction, and the evident intent of the parties. A contract is to be construed by reference to all its parts and provisions, and the nature of the transaction which forms its subject matter; and* so the mere form of words used, and the relative order and position of promises, considerations, covenants and .conditions recited in the instrument, are to be construed and are to govern according to the purpose and intent of the parties from a rational interpretation of the whole contract. 2 Parsons on Contracts, *511, 525-9; Bishop on Contracts, secs. 586-9.

Counsel for plaintiff cite Metcalf on Contracts as authority for the proposition that “ if any part of the condition of a bond be against law, it. is void for that part, and good for the rest;” but this proposition, stated thus nakedly, is misleading, for it is based on' the case of Chamberlain v. Goldsmith, 2 Brownlow, 280, cited in support of the text, in which case the “condition” referred to was a covenant on the part of the obligor, and involves only the rule applicable to a severable illegal promise or condition, the same as the leading case of Chesman v. Nainby, 2 Strange, 139, and 2 Ld. Raymond, 1456, where the breach was assigned upon the good condition only.

Whether a provision is to be construed as a covenant or a condition, is to be determined by its legal character. Pierce on Railroads, 135; Blanchard v. Detroit, etc. R. R. Co. 31 Mich. 49. No particular form of words is necessary to create a covenant. Any words will be effectual for that purpose which show that the party sought to be charged, as a covenantor intended to agree to do, or to refrain from doing, something in which the other party had an interest. Livingstone v. Stickles, 8 Paige, *403; 1 Parsons on Contracts, *511.

It is to be observed that nothing whatever to be done on the part of the plaintiff company is anywhere in the contract expressly stated to be a consideration by that term; what is expressed as for a consideration, in the proper locus of the instrument for the insertion of the consideration clause., to wit: the building of the road from La Junta to Trinidad within a time specified, is named a “condition,” but cannot be regarded any more or less a condition than those stipulations recited in the latter part of the contract respecting the failure of the railroad company to keep its principal place of business for Las Animas county at the town of Trinidad, and the failure to keep its repair and machine shops, if built in said county, within a mile of said town, which stipulations are inserted as conditions in form, defeasant of the bond. And in connection with these latter conditions is recited that one providing against building a side track at El Moro. Now, it cannot be said that the condition'first named is not an implied promise by plaintiff' to build its road between the points named within the specified time, nor that as such promise it did not become a part of the consideration for the engagement of the defendants. Nor can it be said that the conditions last named in the contract were not intended by the parties, and are not to be treated, as like implied promises on the part of the plaintiff, that it would establish and keep its principal place of business for that county at Trinidad, and would locate and keep within one mile of that place its machine shops erected in that county (for the defendants engaged to furnish forty acres of ground for this and depot purposes), and that it would not build a side track at El Moro.

These several conditions, then, all stand upon the same footing as to their legal character in the instrument; that is to say, while one is inserted in one part of the instrument, and the others, in a different guise, in another part, yet they alike import promises of things to be done, and other things not to be done; and as such they together constitute and operate as the consideration for the entire obligation of the defendants.

Considering the entire contract, the parties thereto, and the nature of the transaction, it seems unreasonable to conclude that any one of these conditions formed no part of the consideration moving to the defendants as obligors of the bond, or that the void condition was any less a consideration than any other one of them.

And where an illegal condition or promise on one side is a part of the consideration for the entire obligation on the other side, it is owing to the impossibility of determining the weight or extent of such portion of the consideration which moved to induce the engagement thereupon, that such void promise or. consideration is held to be unseverable, and avoids the whole contract.

We agree that where an illegal promise has been exacted from, or an illegal condition imposed upon the plaintiff by the defendants, for the benefit of the latter, or to the injury of the public, or by reason of enmity to third parties, such a defense comes with very ill grace from the mouths of defendants; but where no element of fraud, deception or mistake appears, and both parties voluntarily, and with full knowledge .and understanding of all the terms and conditions, enter into a contract such as to place both parties in pari delicto, the law will not aid either party to enforce the contract, or to relieve from the effects of the performance thereof; but leaves them just where it finds them. In some cases, under the application of this rule, a defendant may gain a pecuniary benefit by reason of his own wrong-doing, or that in which he has equally participated; but it is not for the sake of the defendant that his objection to his own illegal contract is ever allowed. In the language of Lord Mansfield, “It is founded in general principles of policy which the defendant has the advantage of, contrary to the real justice, as between him and the plaintiff, by accident, if I may so say. The principle of public policy is this: ex dolo malo non óritur actio. No court will lend its aid to one who founds his cause of action upon an immoral or illegal act. If from the plaintiff’s own showing, or otherwise, the cause of action appears to arise ex turpi causa, or the transgression of a positive law of the country, then the court says he has no right to be assisted. It is upon that ground that the court goes; not for the sake of the defendant, but because they will not lend their aid to the plaintiff. So, if the plaintiff and defendant were to change sides, and the defendant was to bring his action against the plaintiff, the latter would then have the advantage of it, for where both are equally in fault, potior esi conditio defendentis.”

In the case of the St. J. & D. C. R. R. Co. v. Ryan, 11 Kan. 602, land was conveyed by Ryan to the railroad company on condition, among others, that a depot should be located and kept at a certain place, and that no other depot should be established or used within three miles of said place; and it was held that no recovery could be had for a violation of the condition not to build another depot within the prescribed limits. A similar case is that of the St. Louis & Chicago R. R. Co. v. Mathers, 71 Ill. 592, where the railroad company accepted a donation in trust of two hundred lots, on condition that they would not establish a depot or station within three miles of certain towns at which depots were agreed to be established. A bill was filed setting up a violation of this condition, and praying a decree for reconveyance of the lots, to which a cross-bill was filed by the company praying a sale of the lots to reimburse for money paid under the terms of the trust, etc.; and the court held that both parties being in pari delicto, neither was entitled to relief.

To summarize the conclusions to which we are led in this case, we hold: .

That the condition not to build a side track at the town of El Moro is ypid as against public policy.

That the contract is one of mutual promises which constitute mutual considerations.

That the void condition mentioned was part of the consideration for the covenant sued on.

That as such consideration, it is not severable from the entire contract, and hence no recovery can be had, the obligation resting in part upon such illegal consideration.

In further support of our construction of this contract, and the legal conclusions thereupon, we cite the following cases: Kimbrough v. Lane, 11 Bush, 556; Wider v. Webb, 20 O. St. 431; Saratoga County Bank v. King, 44 N. Y. 87; Chandler v. Johnson, 39 Geo. 35; Braitch v. Guelick, 37 Iowa, 212; More v. Bonnett, 50 Cal. 251; Bixby v. Moor, 51 N. H. 402; Valentine v. Stewart, 15 Cal. 404; Hamilton v. Thrall, 7 Neb. 210; Arnott v. The P. & E. Coal Co. 2 Hun, 591; Hannaur & Co. v. Gray, 25 Ark. 351.

The demurrer was properly sustained, and the judgment of the court below is affirmed.

Affirmed.  