
267 N.W.2d 836 (1978)
BRADLEY GRAIN CO., a South Dakota Corporation, Plaintiff and Appellant,
v.
James PETERSON, Defendant and Respondent,
and
Steve Thomas, Defendant and Respondent.
Nos. 12179, 12180.
Supreme Court of South Dakota.
Argued March 9, 1978.
Decided July 13, 1978.
David Gronbeck of Berg, Hacking & Berg, Minneapolis, Minn., Loucks, Oviatt, Bradshaw, Green & Schulz, Watertown, for plaintiff and appellant.
Raymond A. Gallagher of Gallagher & Battey, Redfield, for defendants and respondents.
MORGAN, Justice.
Appellant brought these actions to recover damages from respondents for failure to deliver grain in accordance with oral agreements entered into via telephone. Among the defenses interposed by the respondents was the illegality of the contracts under SDCL 38-14-5 and SDCL 38-14-6, and upon motion by the respondents, the trial court granted summary judgment in each of the cases based on this defense. From *837 these summary judgments, appellant appeals. By order of this court, the appeals were consolidated for written and oral arguments. We reverse the actions of the trial court.
It is undisputed that the contracts entered into were oral contracts for future delivery of grain. There was never any written memo showing the date, kind, grade and quality, number of bushels, price agreed upon, and period allowed for delivery signed by the parties or their agents in conformity with SDCL 38-14-5.[1]
Under the provisions of SDCL 38-14-6, violation of the provisions of SDCL Chapter 38-14 is a Class 2 misdemeanor, punishable by up to thirty days imprisonment in the county jail or a one hundred dollar fine, or both.
Appellant seeks to avoid compliance with the statute on two grounds. First, appellant contends that the statute refers only to a present purchase where title passes at the time of the agreement as opposed to an agreement to purchase. The trial court determined that the statute does not make the distinction characterized by the appellant, noting that under U.C.C. § 1-201, as codified in SDCL 57-1-2(29), purchase includes any voluntary transaction creating an interest in property and does not necessarily require title transference. With this holding we agree.
Appellant next contends that, assuming the contracts violate the statute, they are not thereby rendered unenforceable on the grounds of public policy. He first points out that the statute is part of an original enactment to prevent grain warehousemen, who operate at more than one station (line operators), from driving a warehouseman with only a single elevator out of business by offering higher prices at one station than it does at others in order to destroy the competition, and declares anyone in violation to be guilty of discrimination, which is prohibited and declared unlawful. Appellant then reasons that the subsequent section regarding written contracts is only for the purpose of furnishing evidence that would be available to the Public Utilities Commission (then the Board of Railroad Commissioners) for investigation. He urges that it is unrealistic to conclude that the legislature intended to take aim at the local elevators when the intent was to police line elevators.
A careful reading of the statute, both as originally enacted and in its present codified form, does not support appellant's argument. While it is beyond question that the discrimination by line operators against locals is the basis for the legislation as set out in the first section, it is the subsequent section that says in pertinent point:
Every public warehouseman . . . engaged in the purchase of grain . . within the state, shall (emphasis added) during each day keep posted, . . . all prices offered that day by such ware-houseman[2]. . . . When any grain. . . is purchased for delivery after the purchase agreement is made, the terms of such agreement shall (emphasis supplied) be reduced to writing . . .[3]
That the duty is imposed on every warehouseman as opposed to line operators cannot be questioned; nor is it unreasonable to expect that documented evidence of the single operator's sales are equally important to an investigation of discrimination. Another section of the statute[4] authorizes the line operator to raise prices at a location where necessary to meet, but not exceed, *838 prices offered by another buyer, which could be a single operator. Had the legislature intended to relieve single operators from the burden of posting prices and reducing agreements to writing, they easily could have done so, but, lacking any manifestation of such intent, we must construe the statute as a whole and as we find it.
SDCL 38-14-6 provides that the violation of any section is a misdemeanor; but appellant contends that this does not mandate a holding that the contracts were void as against public policy. In this regard, his argument is multiple. First, the legislature did not specifically declare such contract void. Second, that avoidance of the contract is not necessary to accomplish the purpose of prevention of monopolization through unfair trade practices on the part of line operators. Third, the contracts are not malum in se. Finally, avoidance would leave both parties to such a contract without remedy, so that a farmer who delivered his grain could not collect for it.
The respondents argued and the trial court noted in its memorandum decision that SDCL 53-9-1 provides that: "A contract provision contrary to an express provision of law or to the policy of express law, though not expressly prohibited or otherwise contrary to good morals, is unlawful." The court went on to state that a court will refuse to adjudicate rights under an unlawful contract, and will not allow itself to be made an instrument of enforcing obligations arising out of an oral contract prohibited by law and declared illegal. With this holding of the trial court we disagree.
We think that the statute is inapplicable in this case, inasmuch as it refers to a "contract provision," that is unlawful. None of the provisions of the contracts between appellant and respondents are unlawful. It is the failure to reduce them to writing and sign the writing that runs afoul of the law. The substance is lawful, but the form is illegal.
Professor Jaeger in Williston on Contracts, 3rd ed., § 1752 states:
A bargain although in itself neither unlawful in what it promises, nor in the consideration for the promise, may be obnoxious as part of a general scheme to bring about an unlawful result, or may be closely connected with some unlawful plan or act. * * * If the contract is merely collaterally connected with an unlawful purpose or act, however, the rule generally adopted is that the contract is valid if it is only remotely connected with an unlawful transaction and rests upon an independent and legal consideration, and the plaintiff can establish his case without relying upon the unlawful transaction.
In this case, the unlawful purpose or act against which the statutes are addressed is the discrimination in the purchase of grain. Respondents do not plead that appellant was discriminatory, nor was there any evidence of discrimination presented to the trial judge on the motions for summary judgment. Therefore, lacking any attempt to connect the contract even remotely with the unlawful transaction contemplated by the statute, the contract would be valid and enforceable.
Appellant's argument finds additional support in the comments in the Tentative Draft No. 12, Restatement of the Law Second on Contracts, § 320, beginning at page 53,[5] where the Restatement discusses *839 when a term is unenforceable on grounds of public policy. First, of course, is when the legislation declares it unenforceable which is not the case here. The alternative is if the interest in its enforcement is clearly outweighed in the circumstances by a public policy against enforcement which the commentator refers to as the balancing of the interests. It was pointed out that in some cases the contravention of public policy is so grave, as when an agreement involves a serious crime or tort, unenforceability is plain, and in other cases the contravention is so trivial that it plainly does not preclude enforcement.
In weighing the factors, in this case, in accordance with subsections (2) and (3), we hold that the interest in enforcement of the contracts clearly outweighs the public policy against enforcement. As the commentary goes on to point out, the strength of the public policy involved is a critical factor in the balancing process. Even when the policy is one manifested by legislation, it may be too insubstantial to outweigh the interest in the enforcement of the term in question. In its original form, in the 1937 Session Laws, the legislature imposed only a fine, and it was not until 1977 that the legislature, in reclassification of the crimes and petty offenses, denominated the offense a Class 2 misdemeanor and thereby making it also subject to a minimal jail sentence. We further feel that there is little likelihood that a refusal to enforce the contracts will further the legislative policy. It appears that the misconduct involved was not deliberate, but rather was, at its worst, merely negligent and at its best, based on absence of knowledge of the requirement. We hold that the factors against enforcement in this case are clearly outweighed by the law's traditional interest in protecting the expectations of the parties, its abhorrence of any unjust enrichment, and the absence of any special public interest against the enforcement of this particular contract.
Accordingly, we reverse the granting of summary judgments by the trial court and remand the cases to the court for a trial on the merits.
DUNN, C. J., and ZASTROW, J., concur.
WOLLMAN and PORTER, JJ., concur specially.
WOLLMAN, Justice (concurring specially).
Although I do not agree with the proposition that the provisions of SDCL 38-14 are applicable to the contracts in question, I do agree that the cases should be remanded for trial. Accordingly, I concur in the result reached by the majority opinion.
I am authorized to state that Justice PORTER joins in this special concurrence.
NOTES
[1]  SDCL 38-14-5 provides:

When any grain or flaxseed is purchased by a public warehouse or miller engaged in the purchase of grain and flaxseed for delivery after the purchase agreement is made, the terms of such agreement shall be reduced to writing in duplicate, showing the date, place, kind, grade, and quality, number of bushels, price agreed upon, period allowed for delivery, and the signatures of the seller and buyer or their agents. One copy shall be retained by the seller and the other by the buyer as a permanent record in his office.
[2]  SDCL 38-14-4.
[3]  SDCL 38-14-5.
[4]  SDCL 38-14-2.
[5]  (1) A promise or other term of an agreement is unenforceable on grounds of public policy if legislation provides that it is unenforceable or if the interest in its enforcement is clearly outweighed in the circumstances by a public policy against the enforcement of such terms.

(2) In weighing the interest in the enforcement of a term, account is taken of
(a) the parties' justified expectations,
(b) any forfeiture that would result if enforcement were denied, and
(c) any special public interest in the enforcement of the particular term.
(3) In weighing a public policy against enforcement of a term, account is taken of
(a) the strength of that policy as manifested by legislation or judicial decisions,
(b) the likelihood that a refusal to enforce the term will further that policy,
(c) the seriousness of any misconduct involved and the extent to which it was deliberate, and
(d) the directness of the connection between that misconduct and the term.
