
458 N.W.2d 797 (1990)
Stanley HIEB, Plaintiff and Appellee,
v.
Floyd OPP, Defendant and Appellant.
No. 16667.
Supreme Court of South Dakota.
Considered on Briefs November 30, 1989.
Decided July 18, 1990.
*798 Lonald L. Gellhaus of Williams & Gellhaus, Aberdeen, for plaintiff and appellee.
Forrest C. Allred and Phillip M. Allred (on brief) of Allred & Allred, Aberdeen, for defendant and appellant.
PER CURIAM.
This action arises from a contract for the installation and construction of a sewage system to service a new home constructed in rural Eureka, South Dakota. Floyd Opp (Opp) was the owner of the property and he entered into the contract with Stanley Hieb (Hieb). After completion of the house, difficulties arose with the sewer system, as a result of which Opp refused to pay the balance on the contract. Hieb brought suit for the balance due on the contract and Opp counterclaimed for damages alleging deficient performance on the contract. The trial court dismissed both claims upon the grounds that the contract was void as a matter of law and Opp appeals. We affirm.
Opp had drawn preliminary plans for the new house with the aid of Rick Weisbeck, who Opp hired to do the actual construction. The plans included descriptions of the electrical and plumbing systems that Opp desired. The preliminary plans were sent to a company in Minnesota for final drafting and preparation of the materials.
Rather than hire Weisbeck as the general contractor, Opp acted as his own general contractor and hired his own plumber and electrician. All of these individuals took *799 their orders from Opp as to how things were to be done. In this vein, Opp also hired Hieb to excavate the basement, install a sewage system and bring a water line into the house.
In the fall of 1985, Hieb dug the basement to a depth jointly determined by Opp, Weisbeck and Hieb, based upon the design of the house.
After the digging of the basement, Hieb and Opp first discussed the details of the proposed sewage system. Opp stated that he wanted a system similar to the one that serviced his old house, a septic tank system with a natural flow two feet below the ground, coming out at the bottom of a hill and draining on the land at the bottom of the hill. Because of the depth to which the basement had been dug, Hieb gave Opp two options for the system. The first was to employ a lift station to raise the sewage up to the level for natural drainage in the manner of the previous system. The alternative was also a natural or gravity flow system which would have to be very deep to permit drainage from the sewer stub in the basement. Hieb left the choice up to Opp who never pursued the lift system.
Opp directed his plumber in the plumbing installation, including placement of the drains, sinks, bathtubs, stools and other fixtures. The plumber tied all of the drains into one sewer stub leading from the lowest drain in the basement. When Hieb returned to complete the outside installation of the sewage system, he had to connect to the sewer system leading from the basement. This mandated Hieb's use of the deep system previously described to Opp. He connected a septic tank to the sewer stub and installed the necessary sewer line and drainage tiles.
About a week after Opps moved into their new house, they began experiencing problems with the sewage system. At one point, raw sewage backed up into the basement damaging the foundation and sheetrock and certain personal property stored in the basement. Opp contacted Hieb and both made futile attempts to remedy the situation by adding a sump pump and culvert at the end of the system. At this point Opp contacted the South Dakota Department of Water and Natural Resources (the department), which sent a scientist to inspect the system. He concluded that the system was improperly designed and constructed. He found six violations of the department's rules concerning small, on-site wastewater treatment systems, namely: deposit of wastewater on the surface, failure to perform percolation tests, excessive depth of the absorption trench, use of improper fill materials, close proximity of the sewage system to the water supply, and improper drainage of the roof and groundwater sump pump into the sewage system.
After hearing the evidence, the trial court found that Hieb and Opp had mutually agreed to ignore the applicable rules of the department on individual and small on-site wastewater systems. The trial court concluded that their contract was thereby rendered void as against public policy, held that neither party should prevail and dismissed both claims with prejudice.
On appeal, Opp raises three issues:
1. Whether responsibility for constructing and installing a septic tank system in compliance with state regulations rests with the owner of the system or the party installing the system?
2. Whether the trial court was clearly erroneous in finding that Opp knowingly and deliberately ignored state health regulations governing septic tank systems?
3. Whether the trial court erred in concluding that the contract between Hieb and Opp is void as a matter of law?
We first examine issue 1. Although the trial court found that both Hieb and Opp had a duty to know the applicable regulations and to implement them in the construction of the sewage system, Opp argues that Hieb, as the "designer" of the system, should bear full responsibility for failure to follow the regulations.
The regulations at issue are set forth in ARSD ch. 74:03:01. First, with respect to *800 responsibility for compliance, ARSD 74:03:01:39 provides:

No person may install, construct, or operate a wastewater treatment or dispersal system or any other system for the treatment or disposal of human excreta which does not meet the requirements of this chapter. (emphasis added).
ARSD 74:03:01:51 likewise provides:

The designer of each on-site wastewater treatment system must take into consideration the distance from any producing water well to the proposed septic tank and absorption system, the slope of the site and the gradient from any producing water well to the wastewater treatment system, the seasonal high groundwater table, the groundwater table, the percolation rate, the lot size, and the type and maximum daily wastewater flow to be treated by the wastewater treatment system. (emphasis added).
The issue involves a mixed question of fact and law in applying the regulations to the trial courts findings of fact. We therefore review the decision de novo. Permann v. Dept. of Labor, Unemp. Ins. D., 411 N.W.2d 113 (S.D.1987). We also note that rules of statutory construction also apply to administrative rules. Hartpence v. Youth Forestry Camp, 325 N.W.2d 292 (S.D.1982). The purpose of the rules of statutory construction is to discover the true intention of the law and that intention must be ascertained primarily from the language expressed in the statute. Reid v. Huron Bd. of Educ., 449 N.W.2d 240 (S.D.1989). In construing a statute, the statutory language is to be accorded its plain meaning and effect. State v. Ohlmann, 444 N.W.2d 377 (S.D.1989).
The provisions of ARSD 74:03:01:39 and ARSD 74:03:01:51 regarding responsibility for compliance with the rules are plain and clear in their meaning. They expressly place that responsibility on those who design, install or construct a wastewater treatment system. Although ARSD 74:03:01:39 also makes reference to those who "operate" the system, this suit does not involve deficient "operation" of a system but rather deficient design and installation of the system.
Based upon the plain language of those rules, while it is beyond question that Hieb bore partial responsibility for compliance, under the facts of this case, we hold that Opp was equally responsible for compliance. Opp acted as his own designer and his own general contractor, a role far beyond that of the ordinary owner. The department representative testified that it is normally the architect or engineer who designs a wastewater system that properly meets statutory requirements and guidelines and takes the required factors into consideration. These factors would include those areas of violation in Opp's faulty sewage system.
Further, it was Opp who determined the type of sewage system that would be installed, one similar to his old system. Opp also determined the location of the house and took active part in determining the depth of the basement. It was Opp who oversaw installation of the inside plumbing, including the location of the drains. All these factors dictated Hieb's use of the deep system he had previously discussed with Opp.
Given Opp's active oversight of all phases of construction of the house, we find that Opp was in part the "designer" of the sewage system that Hieb installed. Opp, having undertaken the role of designer, also undertook the responsibility for compliance with the rules accompanying that role. We affirm the trial court on this issue.
For his second issue, Opp contests the trial court's finding that he and Hieb "mutually agreed to ignore" the applicable regulations. Opp argues that the finding is clearly erroneous because there is nothing in the record to show that he was aware of the pertinent rules or that he knowingly agreed to violate them.
A trial court's finding of fact shall not be set aside unless it is clearly erroneous. In determining whether a trial court's finding of fact is clearly erroneous, the question is not whether this court would have made the same finding as the trial *801 court. The question is whether, after reviewing all of the evidence, this court is left with a definite and firm conviction that a mistake was made. In such a review, the successful party is entitled to the benefit of his version of the evidence and of all inferences fairly deducible therefrom which are favorable to the trial court's action. The burden of establishing the incorrectness of the trial court's findings is on the appellant. (citations omitted).
Farmers Union Coop v. Schladweiler Bros., 448 N.W.2d 650, 652 (S.D.1989). Based upon our review of the evidence, we are not convinced that the trial court was mistaken.
At the outset, we note that Opp's statement of the issue misstates the trial court's finding. The trial court did not find that he "knowingly" ignored the rules. However, Opp is presumed to know the law. Johnson v. Graff, 68 S.D. 562, 5 N.W.2d 33 (1942). This law applies to rules adopted by the departments. SDCL 1-1-22, 1-1-23(8). Yet, neither party discussed or even mentioned compliance with any regulations when planning the system. We affirm the trial court on this issue.
Opp's third issue, whether the contract is void as a matter of law, is again a mixed question of fact and law. The law is clear. As we have stated in State Ex Rel. Meierhenry v. Spiegel, Inc., 277 N.W.2d 298, 300 (S.D.1979):
Any contract which directly or indirectly exempts anyone from violation of the law, whether willful or negligent, is deemed to be against the policy of the law (SDCL 53-9-3) and any contract provision which is contrary to an express statute or to the policy of an express statute is unlawful (SDCL 53-9-1). See Schurr v. Weaver, 1952, 74 S.D. 378, 53 N.W.2d 290. (emphasis added).
It has long been the rule in this state that: "[t]he law leaves the parties to illegal contracts where it finds them, and gives them no assistance in extricating themselves from the situation in which they have placed themselves...." Norbeck & Nicholson Co. v. State, 32 S.D. 189, 198, 142 N.W. 847, 849 (1913).
The principle supporting the avoidance of contracts in violation of public policy is that no person can lawfully do that which is injurious to the public or against the public good. Meierhenry, supra. Further, freedom of contract is subject to reasonable restraint by the state, under the police power, to protect the safety, health, morals, and general welfare of the people. Id.
An early application of these principles took place in Wess v. South Dakota Packing & Shipping Co., 43 S.D. 467, 180 N.W. 510 (1920). In Wess, a seller contracted with a buyer for the sale of certain livestock. Unknown to the seller at the time, the animal was diseased. The disease was discovered on inspection of the animal at the place of delivery by a federal inspector. The inspector had the animal killed and the remains destroyed. The seller brought suit against the buyer for the contract price and prevailed in his action. We reversed on the basis of a statute prohibiting the act of selling a diseased animal for food purposes and the rule that contracts made in violation of law are void. In reaching our conclusion, we stated that the good faith of the seller in making the sale without knowledge of the condition of the animal was "immaterial." Wess, 43 S.D. at 471, 180 N.W. at 511.
In this instance, just as in Wess, the object of the contract, the construction of a sewage system, was lawful. However, the contract was not performed in a lawful manner because of Hieb and Opp's agreement to ignore the regulations in installing the system and because of Opp's failure to perform required percolation tests prior to installation of the system.[*] Thus, just as with the sellers' lack of knowledge in Wess, *802 we find Opp's contentions concerning lack of knowledge of the rules immaterial.
To paraphrase Wess, the rules concerning wastewater treatment have been enacted as an exercise of the police power based upon explicit and well-grounded public policy. This policy has as its purpose the prevention of the menace to the public health and welfare created by the pollution of the waters in this state through the discharge of waste without necessary and proper treatment. SDCL 34A-2-1. Opp's lack of intent to violate the rules in constructing his sewage system does not excuse his infraction of such a police regulation. See, Wess, supra. We affirm the trial court on this issue.
Affirmed.
NOTES
[*]  ARSD 74:03:01:66 provides in pertinent part:

The owner of the land on which a subsurface absorption system is to be constructed or installed shall ensure that a percolation test is conducted in accordance with § 74:03:01:67 before installation of any such system.
