
381 P.2d 489 (1963)
LEIMAN-SCOTT, INC., a Corporation, Plaintiff and Appellant,
v.
George HOLMES and Dorothy Holmes, Defendants and Respondents.
No. 10425.
Supreme Court of Montana.
May 14, 1963.
Stephen M. Swanberg, Great Falls (argued orally), for appellant.
John M. McCarvel, Great Falls (argued orally), for respondents.
DOYLE, Justice.
This is an appeal from a judgment of the district court of the eighth judicial district, in and for the County of Cascade. The case was tried to a jury but at the conclusion of the plaintiff's testimony the Honorable R.J. Nelson, District Judge, on motion of the respondents granted a nonsuit.
Appellant is a Colorado Corporation which sent agents into western Montana and contiguous states, soliciting grocery stores and other businesses to provide a sales outlet for the sales of packaged hosiery; other items; plaintiff to furnish the *490 racks upon which the merchandise was to be displayed. The record discloses that on April 8, 1958, appellant and respondents entered into a written agreement by the terms of which the respondents would pay the appellant the sum of $10,000 for the Idaho and western Montana territory, together with the display racks in the several outlets, and an important consideration is stated as follows in the body of this instrument:
"This means that Leiman-Scott, Inc., [appellant] will not use their efforts and facilities to compete against George Holmes, [respondent] in the Idaho and Western Montana territory."
The $10,000 note was to be paid at the rate of $2,000 per year, beginning in the year 1958 and payment was made for that year and for the year 1959 or a total of $4,000 for two years with the $6,000 still remaining for the years 1960, 1961 and 1962.
Appellant's complaint alleges that demand was made on the respondents for the sum of $2,000 on December 31, 1960, which sum was not paid. The promissory note in question also provided that at the option of the holder (appellant here), the entire balance would become immediately due and payable, and that it exercised its option to demand its $6,000 by filing this suit on January 13, 1961.
The respondents in their answer set up two separate affirmative defenses, the first being that the plaintiff-appellant was a foreign corporation not authorized to do business in the State of Montana, which was later abandoned. The second affirmative defense was that the promissory note and agreement were breached by the plaintiff-appellant, in that the plaintiff-appellant did compete and do business in the restricted territory contrary to said agreement.
The cause was tried on November 21, 1961, and on November 22, 1961, the court granted the motion of the attorney for the respondents for nonsuit, predicating its decision upon the second affirmative defense of the respondents, namely, that the appellant had competed in the territory assigned to the respondents.
This appeal is from that judgment.
The only specification of error is the granting of the nonsuit by the trial court.
From the record it appears that both parties viewed each other as having an aurora of suspicion and distrust in their business transaction, notwithstanding the written agreement.
Both respondents and appellant violated the written agreement. The respondents by failing to pay the annual $2,000 payment. The appellant thereafter by sending into the respondents' restricted sales area, its own sales representative who sold approximately $1,500 of merchandise in violation of the written agreement.
Appellant contends with merit that the judgment of the district court should have been for $6,000 less the profit on $1,500 of merchandise sold by its representative. With this contention this court agrees.
We find the general rule in 38 C.J.S. Good Will § 16, p. 961, which states:
"Where the seller of a business and its good will improperly interferes with the good will transferred, or commits a breach of his restrictive covenant, the purchaser may have an action for damages, or he may counterclaim for damages in an action by the vendor for recovery of the price. General rules of procedure apply in such actions.
"The damages accruing to the purchaser if the seller improperly interferes with the good will transferred, or commits a breach of a restrictive covenant, are the loss which the purchaser sustains by reason of the wrongful conduct of the seller.
This court stated in Advance-Rumely Thresher Company v. Terpening, 58 Mont. 507, 511, 193 P. 752, that "The buyer may affirm the contract and sue for damages for the breach of warranty, or he may rescind the contract and sue for a recovery of the money paid; but he cannot insist that the contract has been rescinded and yet recover on the contract." Also see Fraser v. *491 Clark, 137 Mont. 363, 352 P.2d 681; Cruse v. Clawson, 137 Mont. 439, 352 P.2d 989.
See discussion of the Advance-Rumely case, supra, in an article by Professor David R. Mason, School of Law, Montana State University, in Volume 21-(1959), pp. 4 to 17 of the Montana Law Review.
In Best Manufacturing Co. v. Hutton, 49 Mont. 78, 92, 141 P. 653, this court observed: "It is not a function of the courts to make contracts for private parties, but when private parties freely contract with each other, and the terms of their contracts are not unlawful, it is the duty of the courts to enforce them. If the defendant expected to stand upon the warranties, his course under the contract was to ascertain whether the outfit could meet the warranties before putting it to other uses, or at least not to use it after ascertaining that it was a failure. * * *
"* * * A breach of warranty which has not been waived, may be pleaded by way of counterclaim to an action on the purchase price, but it cannot be relied on as a defense, after acceptance and retention by the purchaser, with knowledge of the breach."
In Jacob v. Miner, 67 Ariz. 109, 191 P.2d 734, the Supreme Court of Arizona quoted with approval from 24 Am.Jur., Good Will, § 28, as follows:
"`There is no principle of law making any distinction between good will and other property with respect to the right of the owner thereof to recover damages for its impairment or destruction. Accordingly, when the seller of good will breaches any of the conditions of his contract, the injured person is entitled to damages.'"
Contemplating the rules above-cited it must of necessity follow that the affirmative defense of the respondents is not a complete and valid defense but on the contrary is an offset to be determined by testimony in mitigation of the sum of $6,000 claimed by appellant.
This question was asked plaintiff on cross-examination, "Did you in that five year period [1958 to 1963] compete against George Holmes? A. Yes sir, after he defaulted on the note, that was the only way to protect our investment, not before that."
The only evidence offered was that of the plaintiff, prior to the granting of the nonsuit. We view this testimony in a favorable light in considering this matter on a motion for nonsuit. See Wight v. Stevenson, 126 Mont. 377, 252 P.2d 241.
For the reasons above-stated, this cause is reversed and remanded to the district court for trial on its merits and in conformity with the opinion expressed herein.
JAMES T. HARRISON, C. J., and CASTLES, JOHN C. HARRISON and ADAIR, JJ., concur.
