
134 N.W.2d 511 (1965)
James J. IGOE, Plaintiff and Respondent,
v.
ATLAS READY-MIX, INC., and Atlas, Inc., Defendants, and
Atlas, Inc., Defendant and Appellant.
No. 8192.
Supreme Court of North Dakota.
April 14, 1965.
*512 Wattam, Vogel, Vogel, Bright & Peterson, Fargo, for defendant and appellant.
Zuger, Zuger & Bucklin, Bismarck, for plaintiff and respondent.
ERICKSTAD, Judge.
This is an appeal by defendant Atlas, Inc., from a judgment of the District Court of Burleigh County in favor of the plaintiff, James J. Igoe.
In seeking relief by way of a declaratory judgment, the plaintiff sought to have declared null and void and unenforceable the provision in a contract between Atlas Ready-Mix, Inc., as seller, and Atlas, Inc., as buyer, which Igoe signed as chairman of the board of the seller and agreed not to "engage in the ready-mix or concrete basement construction business within the City of Bismarck or the City of Mandan."
In his complaint Igoe alleged that this contractual provision was void as a restraint of business in violation of § 9-08-06, North Dakota Century Code.

*513 "9-08-06. In restraint of business voidExceptions.Every contract by which anyone is restrained from exercising a lawful profession, trade, or business of any kind is to that extent void, except:
"1. One who sells the good will of a business may agree with the buyer to refrain from carrying on a similar business within a specified county, city or village, or a part of either, so long as the buyer or any person deriving title to the goodwill from him carries on a like business therein; * * *" North Dakota Century Code.
Atlas, Inc., in answer acknowledged the existence of the provision in the contract but denied that it was contrary to law or void. It further alleged that the complaint did not state a cause of action. On plaintiff's motion the court ordered summary judgment on the pleadings, declaring the provision void. It is from this judgment that Atlas, Inc., appeals.
The questioned provision of the contract reads as follows:
"As part of the consideration for this transaction, James J. Igoe agrees that so long as the Buyer or any person deriving title to the business here sold conducts a similar business in the City of Bismarck, North Dakota, or City of Mandan, North Dakota, or any part or portion thereof, but in no event for a period of more than ten (10) years from this date, he will not directly or indirectly, in association with or through a corporation, partnership or otherwise, or by financing others in connection with such operations, engage in the ready-mix or concrete basement construction business within the City of Bismarck or the City of Mandan."
This court construed a similar contractual provision in Mandan-Bismarck Livestock Auction v. Kist, N.D., 84 N.W.2d 297. The provision read as follows:
"The sellers, as a part of the consideration of this contract, do hereby agree and covenant not to engage in the business requiring a livestock sales license from the State of North Dakota under existing law, for a period of ten years within the counties of Morton and Burleigh in the State of North Dakota."
After quoting the law our court said:
"There is no ambiguity in the language of the quoted section. The area within which a party to a contract of sale of his business may legally agree not to engage in a similar business is limited to a `specified county, city or village, or a part of either.' The language employed can not be construed to permit a seller to bind himself to refrain from engaging in such business in a larger area than one county or one city, or one village, or a part of either county, city or village." Mandan-Bismarck Livestock Auction v. Kist, supra, at 300.
In concluding that the covenant not to compete was void as a violation of § 9-0806, North Dakota Revised Code of 1943 (which is identical to § 9-08-06, North Dakota Century Code), the Court refused to compel specific performance of the contract.
The appellant buyer herein argues that Mandan-Bismarck may be distinguished from the instant case because in the instant case the seller seeks to have the promise not to compete contained in a fully performed contract for the sale of a business declared illegal, whereas in Mandan-Bismarck the assignees of the buyers sought to have a contract specifically performed; and because in the instant case the word "or" was used, whereas in Mandan-Bismarck the word "and" was used.
In analyzing Mandan-Bismarck we note that F. C. Kist, Laura Kist, and Joseph P. *514 Schaaf, doing business as Mandan Livestock Sales, agreed to sell the assets, name, and good will of their livestock sales business to R. S. John and Gerald Boren. Messrs. John and Boren assigned their interest in the contract to Mandan-Bismarck Livestock Auction, a corporation, which instituted an action to require the sellers, Kists and Schaaf, to specifically perform the contract. The Court found the covenant not to compete void in violation of § 9-0806, N.D.R.C. of 1943, and the entire contract unenforceable, after quoting § 9-0403, N.D.R.C. of 1943, and pointing out that the contract was in other respects vague and indefinite.
"9-0403. Unlawful, Impossible, or Unascertainable Object Voids Contract. When a contract has but a single object, and such object is unlawful in whole or in part, or wholly impossible of performance, or so vaguely expressed as to be wholly unascertainable, the entire contract is void." North Dakota Revised Code of 1943.
In the instant case a much different situation is presented. Although the pleadings do not specifically indicate that all the provisions of the contract have been performed, it was so argued in this court by the appellant, without objection from the respondent. This being so, we must assume from the terms of the contract that the buyer, among other things, paid the seller $75,000.00 on April 18, 1960, the date of the execution of the contract, and the balance of the purchase price, $35,525.39 plus interest at five per cent per annum on or before April 18, 1961; that the buyer assumed a prior mortgage in excess of $20,000.00; that on April 23, 1960, the buyer took over the ready-mix and concrete basement construction business of the seller; and that the seller conveyed to the buyer vehicles, equipment, and all of its inventory in connection with its ready-mix and concrete basement construction business, 0.98 acres of land in Auditor's Lot 6 of Section 3, Township 138 North of Range 80 West, and Lots 5 and 6 in Block 1 of Casey's Industries, Inc., First Addition to the City of Bismarck, Burleigh County, North Dakota.
Although good will was not specifically mentioned, in the absence of any expression to the contrary in the contract for sale of the business the good will passed. See Syllabus 5 of Engstrom v. Larson, 77 N.D. 541, 44 N.W.2d 97, at 98.
The very fact that there was a covenant not to compete in connection with this sales agreement requires a determination that good will, although not specifically mentioned, was a subject of the sale and passed as an incident of the transfer of real and personal property involved.
"In instances where a party sells his business, and, in connection with such sale, agrees that he will not engage in the same or similar business in the same area for a particular and reasonable length of time, it is obviously the intention on the seller's part to sell the good will of the business, even though the contract, as in this instance, fails to expressly mention good will." Vancil v. Anderson, 71 Idaho 95, 227 P.2d 74, at 77.
In the instant case the covenant not to compete restrained Igoe, whom the contract described as "chairman of the board" of the seller, from competing in business in Bismarck or Mandan. We assume from the fact that he was chairman of the board that he also was a stockholder who benefited from the inclusion in the sale of the good will in the increased sales price.
It is clear that stockholders may obligate themselves not to become competitors of the purchaser. 36 Am.Jur. Monopolies, Combinations, Etc. § 70 (1941).
South Dakota, with a statute identical to ours, said:
"* * * We hold that upon a sale of a business and the good will thereof by a *515 corporation, all those who, owing to their real control of the good will of such business, are necessary parties to any real transfer of such good will, and who, owing to their ownership of stock in the corporation, will be directly benefited by any increase in price received for such good will, may, upon the sale of the business and good will, bind themselves to refrain from becoming competitors, and thus decrease or destroy the value of such good will." Public Opinion Pub. Co. v. Ransom, 34 S.D. 381, 148 N.W. 838, at 841, Ann.Cas.1917A, 1010.
In a North Dakota case decided in 1927, our court said:
"Where a stockholder is an officer of a corporation and has contributed his personal skill in conducting the business of the corporation, a sale of his entire stock, accompanied by an agreement not to re-engage in a similar or competing business, may involve the sale of the good will." Syllabus 1, Bessel v. Bethke, 56 N.D. 1, 215 N.W. 868.
Although the territorial issue was not raised in Bessel, it is interesting to note that the promise by the minority stockholder therein was that he would "not engage in the undertaking, embalming, funeral directing, hardware, or furniture business either as owner or as agent, servant, manager, or clerk for himself or for any one else, in the city of Harvey, nor at any other place within a radius of 15 miles from the city of Harvey, N.D."
The fifteen-mile radius of Harvey involved a territory extending beyond the boundary line of a portion of Wells County, in which Harvey is situated, and thus was an area larger than one county or one city or one village. This court nevertheless affirmed the district court's order which restrained the former minority stockholder from engaging in the said business in Harvey.
In a case involving a restraint against competition contained in an employment contract rather than in a contract for the sale of good will ancillary to the sale of a business, the employment contract "expressly set forth that, should the plaintiff leave the employment and service of the defendant at any time during the life of the contract, the plaintiff would not, for a period of two years after leaving such employment, engage either directly or indirectly in the practice of dentistry in any form within the city of Grand Forks, N.D., or the city of East Grand Forks, Minn." The Court therein said:
"If the appellant is right in his contention that in principle the plaintiff and defendant were partners, then that part which provides that the defendant shall not engage in the profession of dentistry in East Grand Forks, Minn., is in violation of section 5930, which provides that: `Partners may upon or in anticipation of a dissolution of the partnership agree that none of them will carry on a similar business within the same city or town where the partnership business has been transacted, or within a specified part thereof.' That part of the contract which provides that the plaintiff shall not engage in the practice of dentistry in East Grand Forks, Minn. would, under this statute, be void. However, it is well settled that that part can be separated from the part which restrains the plaintiff from practicing in Grand Forks, N.D., and, if the latter is reasonable, it would be valid." Olson v. Swendiman, 62 N.D. 649, 244 N.W. 870.
The inference is that had the promise not to compete been contained in a contract for the sale of good will ancillary to the sale of a business, or had it been contained in an agreement among partners upon or in anticipation of the dissolution of a partnership, it would have been enforceable in the city where the parties had previously done *516 business together or where partners had practiced dentistry together, even though the promise covered an area greater than one village or one city or one county, or even though the promise covered an area larger than the city or town where the partnership business had been transacted; and thus that it was unenforceable only in the area in excess of the permissible area of restraint.
In the appellant's second basis for distinguishing Mandan-Bismarck, namely, the use of the word "or" instead of the word "and" we find little merit. The only reasonable interpretation of the promise not to engage in a competing business within the city of Bismarck or the city of Mandan is that the promisor would not compete in either city.
We do believe, however, that, under the circumstances of this case, where the contract has been fully performed so that the seller has reaped the benefit of the restraining promise in culminating the sale or in securing an increased price for the business, he should not be allowed to entirely escape the consequences of his promise, to the promisee's detriment, merely because he promised to refrain from doing business in two cities when the statute permitted him to disable himself from competing in only one city.
The following excerpt from Williston on Contracts is in line with our views:
"If a sharply defined line separated a restraint which is excessive territorially from such restraint as is permissible, there seems no reason why effect should not be given to a restrictive promise indivisible in terms, to the extent that it is lawful. * * * Questions involving legality of contracts should not depend on form. Public policy surely is not concerned to distinguish differences of wording in agreements of identical meaning. * * *
"While the Restatement of Contracts, § 518, has accepted the rule laid down by the majority of American courts as stated in the preceding section, the tendency of the late American cases has been toward the minority view, that the legality of contracts in restraint of trade should not turn upon the mere form of wording but rather upon the reasonableness of giving effect to the indivisible promise to the extent that would be lawful. * * *" 5 Williston, Contracts § 1660 (rev. ed. 1937).
Professor Corbin is in accord with Professor Williston:
"An agreement restricting competition may be perfectly reasonable as to a part of the territory included within the restriction but unreasonable as to the rest. Will the courts enforce such an agreement in part while holding the remainder invalid? It renders no service to say that the answer depends upon whether or not the contract is `divisible.' `Divisibility' is a term that has no general and invariable definition; instead the term varies so much with the subject-matter involved and the purposes in view that its use either as an aid to decision or in the statement of results tends to befog the real issue.
"With respect to partial illegality, the real issue is whether partial enforcement is possible without injury to the public and without injustice to the parties themselves. It is believed that such enforcement is quite possible in the great majority of cases. If a seller whose business and good will do not extend beyond the city limits of Trenton promises not to open a competing business anywhere within the state of New Jersey, the restriction is much greater than is reasonable. This is a good reason for refusing to enjoin the seller from doing business in Newark; *517 but it is not a good reason for permitting him to open up a competing store within the same block in Trenton.
"In a good many cases it was held that if the contract itself indicated no geographical line between the reasonable and the unreasonable, it was `indivisible' and illegal as a whole. Thus, if a seller promised not to compete anywhere in England the whole was void, but if he had promised not to compete in London or elsewhere in England, partial enforcement was possible in case the business had extended throughout London.
"The rule that is applied in the line of cases following Mallan v. May, [11 M. & W. 653 (1843)], has been colorfully described as the `blue pencil rule,' sometimes with approval and sometimes to discredit it. By this rule, the divisibility of a promise in excessive restraint of trade is determined by purely mechanical means: if the promise is so worded that the excessive restraint can be eliminated by crossing out a few of the words with a `blue pencil,' while at the same time the remaining words constitute a complete and valid contract, the contract as thus `blue pencilled' will be enforced. By some occult process, the courts adopting this rule convinced themselves that partial enforcement without the aid of a `blue pencil' would be `making a new contract for the parties' while partial enforcement in the wake of a `blue pencil' is not. In very many such contracts, it would be possible to eliminate all the illegal restraint by `blue pencilling' the restraining promise as a whole, while the remaining words would constitute a complete and valid employment contract or one for the purchase and sale of a business. Perhaps this should be held improper as causing an excessive erosion of the blue pencil.
"In very many cases the courts have held the whole contract to be illegal and void where the restraint imposed was in excess of what was reasonable and the terms of the agreement indicated no line of division that could be marked with a `blue pencil.'52 In
"52 * * * In some of these cases the question of partial enforcement may not have been raised.
"Restatement, Contracts, § 518, follows this doctrine, probably because it was believed to accord with the weight of authority. The present writer advises not following it. The section reads: `Where a promise in reasonable restraint of trade in a bargain has added to it a promise in unreasonable restraint, the former promise is enforceable unless the entire agreement is part of a plan to obtain a monopoly; but if full performance of a promise indivisible in terms would involve unreasonable restraint, the promise is illegal and is not enforceable even for so much of the performance as would be a reasonable restraint.' There is no objection to the first clause herein, bearing in mind that no restraint should ever be described as `reasonable' if it is `part of a plan to obtain a monopoly.' But the cases that are in conflict with the second clause are the ones to be followed. See the notes by Professor Samuel Williston and the present writer in 23 Conn.Bar Jour. 40, 43.
"Professor Samuel Williston, who drafted § 518 for the Institute, agreed with this. In a note on Beit v. Beit, 63 A.2d 161, 135 Conn. 195, [10 A.L.R.2d 734] (1948), 23 Conn.Bar Jour. 40, he later said: `I have concluded and have so stated in § 1660 of the Revised edition of my treatise on Contracts in spite of the contrary rule stated in § 518 of the Restatement of Contracts, that in such a case the unquestionably legal part of this covenant should be enforced. * * * If any part of the covenant promised anything criminal or seriously bad in itself the whole covenant, whether in divisible form or not, should be unenforceable. But this is not the case.'
the best considered modern cases, however, the court has decreed enforcement as against a defendant whose breach has occurred within an area in which restriction would clearly be reasonable, even though the terms of the agreement imposed a larger and *518 unreasonable restraint." 6A Corbin, Contracts § 1390 (1962).
The following are a few of the recent decisions termed by Professor Corbin as the best considered modern cases wherein the court decreed enforcement against a defendant whose breach occurred within an area in which restriction would clearly be reasonable, even though the terms of the agreement imposed a larger and unreasonable restraint. Ceresia v. Mitchell, Ky., 242 S.W.2d 359 (involved business restraint); Fullerton Lumber Co. v. Torborg, 270 Wis. 133, 70 N.W.2d 585 (involved post employment restraint); Redd Pest Control Co. v. Heatherly, 248 Miss. 34, 157 So.2d 133 (involved post employment restraint); Martinez v. Martinez, 41 Cal.2d 704, 263 P.2d 617 (involved business restraint and statute quite similar to North Dakota statute).
In the instant case the contract discloses that the real estate which was sold as part of the business consisted of approximately one acre of land lying near a railroad right of way in Burleigh County and lots within the city of Bismarck in Burleigh County. The covenant not to compete in business is therefore valid and enforceable in Bismarck, but illegal and unenforceable in Mandan, as our statute makes such a restraint legal in only one village or one city or one county.
Before we may definitely so conclude, we must consider the appellant's further argument that the seller's complaint should have been dismissed by the trial court on the ground that it failed to state a cause of action. Involved is the argument that no actual controversy existed between the parties and that therefore an action seeking a declaratory judgment as to the legality of the covenant not to compete in business was not proper. In a 1948 decision the Connecticut Supreme Court of Errors, in discussing this question, has this to say:
"Professor Borchard cites several cases to support his statement that a promisor is entitled to a judgment that a covenant he has made is unenforceable as against public policy. Borchard, Declaratory Judgments (2d Ed.) p. 515. In most of these cases the courts did render judgment holding the agreements to be illegal, but without discussing the question whether to do so falls within the proper field of declaratory judgments. See also Ertel Bieber & Co. v. Rio Tinto Co., [1918] A.C. 260, 275. Where a promisor seeks a declaratory judgment that a covenant he has made is unenforceable as against public policy, the case is stronger than it is where he seeks affirmative relief. Implied in his action is a willingness on his part to abide by the covenant if it is found to be legal; and if the court finds it not enforceable the public policy to which it runs counter is thereby maintained. If the fact that a promisor has received a valuable consideration does not preclude him from defending against the enforcement of a contract because it is against public policy, or from seeking affirmative relief against it by way of cancellation or the like, we cannot see why that fact should preclude him from seeking a declaratory judgment to determine whether or not it is an enforceable agreement. If the other conditions requisite for granting relief are present, there is no reason why he should not have a declaratory judgment as to the validity of the agreement. See Schaefer v. First National Bank, 134 Ohio St. 511, 519, 18 N.E.2d 263. In the instant case a declaration that the covenant is unenforceable will determine the right of the plaintiffs to establish a grocery business within the area included in the agreement, and the parties are not left in uncertainty as to their rights, with the ultimate solution only to be reached when the plaintiffs have incurred expense in starting a business and the defendant has brought an action *519 for an injunction or damages. Sigal v. Wise, 114 Conn. 297, 301, 158 A. 891; Sage-Allen Co. v. Wheeler, 119 Conn. 667, 673, 179 A. 195, 98 A.L.R. 897." Beit v. Beit, 135 Conn. 195, 63 A.2d 161, at 164, 10 A.L.R.2d 734.
The sections of our code pertinent to this discussion are as follows:
"32-23-01. Court of record may enter a declaratory judgment.A court of record within its jurisdiction shall have power to declare rights, status, and other legal relations whether or not further relief is or could be claimed. No action or proceeding shall be open to objection on the ground that a declaratory judgment or decree is prayed for. The declaration may be either affirmative or negative in form and effect, and such declaration shall have the force and effect of a final judgment or decree.
"32-23-02. Power to construe contracts, statutes, and wills.Any person interested under a deed, will, written contract, or other writings constituting a contract, or whose rights, status, or other legal relations are affected by a statute, municipal ordinance, contract, or franchise, may have determined any question of construction or validity arising under the instrument, statute, ordinance, contract, or franchise and may obtain a declaration of rights, status, or other legal relations thereunder.
"32-23-03. Construction before or after breach.A contract may be construed either before or after there has been a breach thereof.
* * * * * *
"32-23-12. Construction of chapter. This chapter is remedial. Its purpose is to settle and to afford relief from uncertainty and insecurity with respect to rights, status, and other legal relations, and it is to be construed and administered liberally." North Dakota Century Code.
In accord with the quoted views expressed by the majority of the court in Beit, and in light of our statute which requires that our declaratory judgment statutes be construed and administered liberally, we find that a justiciable controversy exists as to whether the promise or covenant not to compete in business in Bismarck or Mandan is enforceable, justifying a determination thereof by a declaratory judgment action.
For the reasons expressed herein the judgment of the district court is affirmed in part and reversed in part. The case is remanded with instructions to the district court to modify the judgment to provide that the covenant restraining business is valid and enforceable in the City of Bismarck but is void and unenforceable in the City of Mandan.
BURKE, C. J., and TEIGEN, J., concur.
KNUDSON, J., not having been a member of the Court at the time of the submission of this case, did not participate.
