
340 N.W.2d 189 (1983)
In the Matter of the Appeal and Hearing for Robert C. CLARK.
No. 13819.
Supreme Court of South Dakota.
Argued November 18, 1982.
Decided November 16, 1983.
*190 Krista Clark of Dakota Plains Legal Services, Eagle Butte, for appellant Robert C. Clark.
Janice Godtland, Asst. Atty. Gen., Pierre, for appellee South Dakota Dept. of Social Services; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
HENDERSON, Justice (on reassignment).

ACTION
Appellant, Robert Clark, appeals a circuit court order affirming a Department of Social Services' (Department) decision denying appellant Clark subsidized energy payments under South Dakota's Low Income Energy Assistance Program (LIEAP). We affirm.

FACTS
Appellant Clark farms in Sully County, South Dakota. Mrs. Clark is a nurse's aide at Oahe Manor, Inc., and a part-time waitress. During December of 1980, appellant Clark applied to Department for LIEAP payments. Since LIEAP required verification of all income, appellant Clark's 1979 income tax return was filed with the Department. The Clarks are homeowners whose 1979 joint income was approximately $30,589.00. Appellant Clark's application for LIEAP energy assistance payments was denied based upon his farming gross profits of $23,904.91 reflected on his 1979 Federal Income Tax Return, Schedule F. The maximum gross income allowed in 1980 for energy assistance eligibility for a family the size of appellant Clark's was $16,890.00.
Examining Mr. Clark's 1979 tax return, we find the following "actual cash outlay" deductions: (1) Labor hired $487.41; (2) Repairs and maintenance $3,935.95; (3) Interest $6,099.84; (4) Rent of farm pasture $7,617.00; (5) Feed $3,040.59; (6) Seeds, plants purchased $1,957.90; (7) Fertilizers, lime, chemicals $95.50; (8) Machine hire $4,751.00; (9) Supplies $806.11; (10) Veterinary fees, medicine $327.57; (11) Gasoline, fuel, oil $6,111.09; (12) Taxes $2,345.53; (13) Insurance $2,891.59; (14) Utilities $605.32; (15) Freight, trucking $355.53; (16) Loss of five calves $1,000.00; and (17) Illegible entries totaling $407.50 ($10.00 of which appears to be for "box rent"). These "cash outlay items" total $42,835.43 and not the $37,797.43 figure reflected on Mr. *191 Clark's Schedule F. Be that as it may, appellant Clark showed a gross profit of $23,904.91.[*] Due to this tax write-off, appellant Clark claimed a loss of $15,314.50 on his farming operation. Appellant and his wife, in filing a joint return, deducted the wife's wages of $2,768.30, thus showing a $12,296.20 loss for the year. We note in the gross profit figure as represented, $16,221.12 for calves produced and sold and $544.09 for hogs produced and sold. Noting this calf sale figure, and further noting that appellant Clark listed, all in all, 87 full-grown cows and three bulls (two of which were being depreciated), it becomes obvious that appellant Clark was not in the low-income bracket. In 1979, the year in question, he purchased thirteen cows for $7,800.00 cash.

ISSUE

DID SOUTH DAKOTA'S MANNER OF MEASURING INCOME FOR ITS LOW INCOME ENERGY ASSISTANCE PROGRAM VIOLATE FEDERAL REGULATIONS REQUIRING EQUAL TREATMENT FOR ALL APPLICANTS AND THE EQUAL PROTECTION CLAUSE OF THE FEDERAL AND STATE CONSTITUTIONS? WE HOLD THAT IT DID NOT.

DECISION
Viewing the income and economic circumstances of appellant Clark and his family, they are not an eligible household, as defined in 45 C.F.R. § 260.1 (1980). There is no elderly or handicapped person in this household. With this type of income and operation, they are not needy in the sense of obtaining subsidized government heat. We simply cannot fit the Clark household within the circumstances and intent for which Congress passed this law. Congress did not intend to help families with substantial income, assets, and corresponding tax write-offs.
The State of South Dakota was founded on a concept of self-reliance. Our South Dakota Const. art. VI, § 27, uniquely provides: "Maintenance of free government  Fundamental principles. The blessings of a free government can only be maintained by a firm adherence to justice, moderation, temperance, frugality and virtue and by frequent recurrence to fundamental principles." Our constitutional mandate of justice, moderation, and frugality requires us to carefully weigh appellant Clark's contentions. Inasmuch as this energy assistance program does not consider net worth, if we adopted appellant Clark's view, a farmer could have assets of $250,000.00 in land, $75,000.00 in cattle, $75,000.00 in machinery, and $25,000.00 in stored crops and still show a loss on his tax form and qualify for free heat. Through exclusions, deductions, and tax shelters, this heat assistance program created for the needy could easily be manipulated. We believe there is an end to this heat lifeline as enacted by the United States Congress. Those unsheltered individuals who pay taxes should not face the chilling reality of being responsible for heating the homes of the Mr. Clarks in South Dakota, and, yes, across the farm belt of America.
In the recent decision of Crawford v. Janklow, 710 F.2d 1321, 1327 (8th Cir.1983), the United States Court of Appeals for the Eighth Circuit examined South Dakota's 1982-1983 LIEAP and held: "[I]f the states wish to narrow the number of persons eligible for assistance, they must exclude persons from the top of the class described by Congress, in terms of income and proportionate energy costs, rather than from the bottom." There can be no doubt that, if by any stretch of the imagination Congress could have intended to help the appellant Clarks of this Nation, appellant Clark's income would certainly be at the upper "top of the class described by Congress."
Congress did not set a National income eligibility standard for LIEAP. 42 U.S.C.S. § 8607(b)(4) (Law.Co-op.1982). The Department had the authority to define income. 45 C.F.R. § 260.160 (1980) provides: "The State shall include in its plan its definition of income and the period of time for *192 measuring income." Through Department, South Dakota complied. In Naegle v. Dep't of Social Services, 525 F.Supp. 1030, 1032 (C.D.S.D.1981), the Court addressed South Dakota's ability to define and measure income for its LIEAP: "Clearly, the state had considerable discretion to define income, and had it either used last year's income tax forms for all applicants, or used the prior 90 days income multiplied by four for all applicants, there would have been little to challenge in the plan." (Emphasis in original.)
Naegle, id., stressed: "To be in compliance with the federal regulation § 160.154(g), the state must treat all applicants equally, regardless of their source of income." Further reinforcement for this view is discovered as one reads on in Naegle, 525 F.Supp. at 1033: "As the prior portions of this opinion have sought to make clear, however, the use of different methods of income calculation for different classes of applicants simply because those applicants have different sources of income lacks any `reasonable basis'."
The Department's method of income calculation treated all applicants equally; they were all judged by their gross monetary intake as either income or profit which was clearly within the state's "considerable discretion" to use as an indicia of income. No applicant was allowed to subtract income tax deductions from his gross income. All were treated alike. The only way the state could determine gross income for the self-employed was to look at gross profits. The state looked at total income for the non-self-employed because the non-self-employed do not have "gross profits." We fail to see any reason for overruling the Department's considerable discretion to define income as gross monetary intake in favor of appellant Clark's nebulous measurement based on tax deductions.
As for appellant Clark's equal protection argument, Dandridge v. Williams, 397 U.S. 471, 90 S.Ct. 1153, 25 L.Ed.2d 491 (1970), set forth the standard for testing the validity of classifications in the area of social welfare. Any regulation adopted by South Dakota must be upheld as long as it is rationally based and free from invidious discrimination. South Dakota, through Department, might not have adopted a perfect classification through its regulation. This does not make the state regulation invalid, for the regulation need not result in mathematical precision, and may well have some inequality without offending the Constitution. Califano v. Jobst, 434 U.S. 47, 98 S.Ct. 95, 54 L.Ed.2d 228 (1977). Simply because there is another method to attack a problem does not mean that the state's method was wrong. Jefferson v. Hackney, 406 U.S. 535, 92 S.Ct. 1724, 32 L.Ed.2d 285 (1972).
Appellant Clark has conceded that the classification in this case involves neither a fundamental right nor a suspect classification. Thus, we "must decide only whether it bears a rational relationship to the purpose of the legislation." Budahl v. Gordon & David Assoc., 287 N.W.2d 489, 492 (S.D. 1980). As mentioned above, the Clarks were not an elderly or disabled household. Mr. and Mrs. Clark's household is not a "low-income household" and is thus excludable from energy welfare by South Dakota. Such exclusion shores up funds for the elderly, disabled, and truly low-income people in this State who need help. Therefore, the classification adopted by the Department is rationally related to the purpose of the legislation.
Affirmed.
FOSHEIM, C.J., and DUNN and MORGAN, JJ., concur.
WOLLMAN, J., dissents.
WOLLMAN, Justice (dissenting).
In December of 1980, Clark, who farms and ranches near Gettysburg, applied to the Department for LIEAP payments for himself, his wife, and his four children. The Department examined Clark's 1979 tax return and determined that Clark was ineligible for assistance because his gross profits from farming, $23,904.91, exceeded the maximum income for eligibility for a family of six, which was $16,890.00. Clark contends that the Department's refusal to permit him to deduct his 1979 farm expenses of $39,219.41 in calculating his household income violated federal regulations governing the LIEAP program and constituted a denial *193 of his right to equal protection of the law under the federal and state constitutions.
The Department's program was created to administer funds designated by Congress to be used for energy assistance payments to eligible households within South Dakota. Eligible households, as defined in 45 CFR § 260.1 and § 260.150, include those households with incomes below the lower living standard established by the Bureau of Labor Statistics. States participating in LIEAP are required to submit a state plan that will comply with the applicable federal regulations. See 45 CFR § 260.15. The Department's state plan measures farmers' household income by using the gross profits figure of Schedule F of the previous year's federal income tax return. Household income for non-self-employed individuals is defined as the household's total gross income for the prior year.
Clark contends that the Department's eligibility guidelines for farmers violates 45 CFR § 260.154(g), which provides in part that "[h]ouseholds eligible under the State's plan and that are similarly situated with respect to energy costs, income and other considerations relevant to assistance under the Act, must receive similar amounts of assistance." The essence of Clark's complaint is that he was not allowed to deduct those expenses which he incurred in producing his total gross income, with the result that his gross farm profits as shown on his previous year's federal income tax farm schedule bears no relationship to the income that he had available for household purposes.
Under attack in Naegle v. Dep't of Social Services, 525 F.Supp. 1030 (1981), was that portion of the Department's state plan which determined LIEAP income eligibility for farmers and other self-employed individuals by using the previous year's federal income tax return and which determined the eligibility of other persons by annualizing their previous 90 days' income. The effect of annualizing quarterly income in Naegle was to deny energy assistance payments to the plaintiffs because their previous 90 days' income, when multiplied by four, exceeded the income eligibility guideline, whereas their actual annual incomes for the previous year were below the guideline figure. The court held that the state plan constituted a manifest violation of 45 CFR § 160.154(g) inasmuch as the income-determining feature of the plan arbitrarily created several different classes of applicants and resulted in a distribution of benefits depending upon the class to which an applicant happened to belong.
In reaching this decision, the court stated, "Clearly, the state had considerable discretion to define income, and had it either used last year's income tax forms for all applicants, or used the prior 90 days income multiplied by four for all applicants, there would have been little to challenge in the plan." Naegle v. Dep't of Social Services, supra, at 1032 (emphasis in original). The Department takes comfort in this language, arguing that inasmuch as the Department looks at the gross income of all applicants, Clark is being treated no differently from any other applicant. Although superficially persuasive, the Department's argument will not withstand analysis, for as Judge Porter stated in Naegle, "To be in compliance with... § 160.154(g), the state must treat all applicants equally, regardless of their source of income." 525 F.Supp. at 1032.
I would hold that the Department violated the mandate of § 160.154(g) by disregarding those items of farm expense which had the effect of reducing Clark's actual disposable household income to the point where he would have been similarly situated with other households eligible for LIEAP payments. I refer, of course, to those expenses that required actual cash outlays by Clark, in contrast to any deductions for depreciation, investment tax credits, or similar items. I do not share the fear that the adoption of eligibility guidelines which would put the self-employed in parity with those whose income is derived from salaries, investment earnings, or similar non-capitalized sources would shatter the constitutional precepts of justice, moderation, and frugality.
NOTES
[*]  Clark's gross income, Schedule F, included $1,690.62 for grains sold, $83.55 patronage dividends, $98.67 State gasoline tax refund, and a cash agricultural program payment of $4,395.95.
