delivered the opinion of the court.
Plaintiff (appellee) filed his statement of claim predicated on defendant’s (appellant’s) failure to pay on demand his promissory note, then past due, for $1,000, payable to plaintiff’s order.
The sole question raised is whether the last amended affidavit of merits stricken by the court stated a legal defense.
It set forth an agreement between the parties for the sale by plaintiff to defendant of 200 shares of the capital stock of the B. Francis Company, a corporation, part of the consideration of which was evidenced by five promissory notes of $1,000 each, the one in question maturing 5 months from the date of the sale, each to be delivered to one Harry J. Caney in escrow “subject to the conditions” of said agreement. One of said conditions was plaintiff’s covenant not to engage in a similar line of business to that of said company for a period of 3 years.
The agreement further provides that upon the maturity of each of said notes the said Harry J. Caney shall present such note upon the date of its maturity to defendant for payment, and upon the payment thereof shall deliver the proceeds to plaintiff “unless the latter shall have been guilty of a violation of this agreement,” and that if plaintiff has not been guilty of a violation of the agreement, and the notes shall not lie paid at maturity, then said escrow holder is to deliver *110them to plaintiff. On certain other contingencies he was to return them to defendant.
The affidavit further set forth the nature of said company’s business and that among other violations of the agreement plaintiff had before the maturity of said note engaged in a similar line of business with said company’s customers and patrons in Chicago and vicinity. An averment to the effect that plaintiff had replevined said note from said Caney we deem unnecessary to consider.
In support of his claim that no legal defense is stated in the affidavit, appellee argues (1) that it does hot appear therein that the business referred to was one which the company was licensed to do, and (2) that the agreement is void as against public policy in not limiting the territory in which appellee agreed not to do a similar business. Neither point is relevant to the material issues raised by the affidavit. As to the first, it is enough to say that this is not a contract with or a suit against the corporation; and as to the second, that the question is not one of enforcing plaintiff’s agreement not to enter into a similar business but whether he can recover payment of the note when its payment is conditional upon his voluntary agreement not to engage in said business.
The contract and notes constitute a single transaction. The latter were delivered in escrow “subject to the conditions” of the former. One of those conditions was that plaintiff would abstain from engaging in a business similar to said company’s, and it is a fair implication from the agreement that if he did engage in such business before the notes matured they were not to be paid, and the affidavit of merits pleads a breach of the agreement in this respect.
It is immaterial that plaintiff’s agreement was one in unnecessary restraint of trade. This is not a case of enforcing that clause of the agreement. Speaking of such a contract, Chief Baron Pollock in Green v. *111 Price, 13 Mees & W. 695, said: “It is not like a contract to do an illegal act. It is merely a covenant, which the law will not enforce, but the party may perform if he choosesThe question here is whether plaintiff having made abstentation from such business a condition of the payment of the note, and not having abstained, defendant is precluded from so pleading. We think not. It is not illegal or even immoral that plaintiff should in fact abstain from engaging in such a business. He might or not, as he chose, and hence there is nothing illegal or immoral in his agreeing that the payment of his note should be conditional on what he might lawfully choose not to do. In respect of the averment of noncompliance with a condition of payment contained in the agreement, the affidavit set up a legal defense. Hence it was error to strike it.
Reversed and remanded.
Mr. Presiding Justice Matchett and Mr. Justice (xridley concur.