This is an appeal from an award of alimony and attorney’s fees in a divorce proceeding. The plaintiff-appellant Robert Murphey challenges on appeal, as he did below, the constitutionality of the statute under which alimony was awarded, former I.C. § 32-706, since repealed, to wives only. He also challenges the award of attorney’s fees to his wife under the provisions of former I.C. § 32-704, since repealed, which provided for awards of attorney’s fees in divorce proceedings to wives only.
I.
The appellant’s contention that the classification established by former § 32-706 discriminates on the basis of sex in violation of the equal protection clauses of the United States Constitution, U.S. Const, amend. XIV § l,1 and the Idaho Constitution, Id. Const, art. I § 2,2 is correct. I.C. § 32-706 provided at the time in question 3 that:
“Alimony for fault of husband. — Where a divorce is granted for an offense of the husband, including a divorce granted upon the husband’s complaint, based upon separation without cohabitation for five (5) years, the court may compel him to provide for the maintenance of the chil*722dren of the marriage, and to make such suitable allowance to the wife for her support as the court may deem just, having regard to the circumstances of the parties respectively; and the court may, from time to time, modify its orders in these respects.”
In 1979 the U.S. Supreme Court decided Orr v. Orr, 440 U.S. 268, 99 S.Ct. 1102, 59 L.Ed.2d 306 (1979). The Alabama statutes challenged in Orr, like our former alimony statute, allowed awards of alimony to the wife only. Id at 270 n. 1, 99 S.Ct. at 1107 n. 1. The Orr court applied the substantial relationship standard of review4 to the Alabama statute. The Court described this standard and why it was to be applied in the following matter:
“In authorizing the imposition of alimony obligations on husbands, but not on wives, the Alabama statutory scheme ‘provides that different treatment be accorded ... on the basis of ... sex; it thus establishes a classification subject to scrutiny under the Equal Protection Clause,’ Reed v. Reed, 404 U.S. 71, 75 [92 S.Ct. 251, 253, 30 L.Ed.2d 225] (1971). The fact that the classification expressly discriminates against men rather than women does not protect it from scrutiny. Craig v. Boren, 429 U.S. 190 [97 S.Ct. 451, 50 L.Ed.2d 397] (1976). ‘To withstand scrutiny’ under the Equal Protection Clause, ‘ “classifications by gender must serve important governmental objectives and must be substantially related to achievement of those objectives.” ’ Califano v. Webster, 430 U.S. 313, 316-317 [97 S.Ct. 1192, 1194-1195, 51 L.Ed.2d 360] (1977).” 440 U.S. at 278-79, 99 S.Ct. at 1111.
After examining the objectives of the Alabama alimony statute, the Court concluded that providing alimony for needy wives, but not needy husbands, was not substantially related to achievement of any of those objectives. While alimony itself serves useful purposes, the Orr Court did not believe that the gender-based classification was at all necessary to effectuate those purposes. It thus reversed the Alabama Supreme Court’s affirmance of the alimony award and remanded, stating that “[this] disposition, of course, leaves the state courts free to decide any questions of substantive state law not yet passed upon in this litigation.” 440 U.S. at 283, 99 S.Ct. at 1114.
Orr is dispositive of the issue of whether former I.C. § 32-706 violates the equal protection clause of the United States Constitution. While alimony serves a number of laudable purposes, as we discuss in part II, infra, there is no discernible relationship between those purposes and the creation of a gender-based classification for determining who receives the benefits of alimony. The goals of the alimony statute would be fulfilled as much by a statute which extends benefits to both needy wives and needy husbands as by a statute which extends benefits to needy wives only. As the Court in Orr put it:
“Legislative classifications which distribute benefits and burdens on the basis of gender carry the inherent risk of reinforcing stereotypes about the ‘proper place’ of women and their need for special protection. Cf. United Jewish Organizations v. Carey, 430 U.S. 144, 173-174 [97 S.Ct. 996, 1013-1014, 51 L.Ed.2d 229] (1977) (opinion concurring in part). Thus, even statutes purportedly designed to compensate for and ameliorate the effects of past discrimination must be carefully tailored. Where, as here, the State’s compensatory and ameliorative purposes are as well served by a gender-neutral classification as one that gender classifies and therefore carries with it the baggage of sexual stereotypes, the State cannot be permitted to classify on the basis of sex. And this is doubly so where the choice made by the State appears to redound — if only indirectly — to the benefit of those without need for special solic*723itude.” 440 U.S. at 283, 99 S.Ct. at 1113-14.
Classifications which perpetuate or encourage sexual stereotypes necessarily burden those persons — of either gender— whose social and economic preferences or conditions do not conform to the stereotypical model. To allow the state to create such classifications, at least in the absence of a substantial relationship between the classifications and an otherwise valid state goal, would be abhorrent to art. I, § 2 of the Idaho Constitution. We therefore hold that former I.C. § 32-706 violates the equal protection clauses of both the Idaho Constitution and the United States Constitution.
II.
Having arrived at the relatively easy conclusion that a statute which allows awards of alimony only to women is not constitutional, we turn to the more difficult task of deciding whether that decision should be applied retroactively, i.e., to declare the statute to have been at all times void and of no effect, or to extend its construction so as to make the statute constitutional. As we noted in Harrigfeld v. District Court, 95 Idaho 540, 545, 511 P.2d 822, 827 (1973), “[a] holding that a statutory classification scheme constitutes a denial of equal protection because it unconstitutionally grants a benefit to one class while denying it to another, does not necessarily mandate a denial of the benefit to both classes.” In deciding whether to construe the statute as neutrally extending the benefits of alimony, we should interpolate that which we believe that the legislature would have intended had it realized that the alimony statute as drafted might somehow transgress constitutional boundaries.
By the plain language of I.C. § 32-706, the purpose of alimony is to provide “support” for the wife. While it is true that under this statute alimony could only be granted when the husband, rather than the wife, was the offending party, this was not intended as a punishment for every offending husband. The purpose of this statute was to provide for the needs of the wife if the divorce was not occasioned through her fault. As this Court stated in Jackson v. Jackson, 87 Idaho 330, 334, 393 P.2d 28, 30 (1964), “Alimony ... is designed solely for the support of the wife.” Cf. Nielsen v. Nielsen, 87 Idaho 578, 394 P.2d 625 (1964) (error to limit alimony to one year when wife’s need for alimony might extend beyond one year); Shepard v. Shepard, 94 Idaho 734, 497 P.2d 321 (1972) (in awarding alimony, due consideration should be given to the correlative needs and abilities of both parties). “ ‘Alimony,’ which signifies literally nourishment or sustenance, is an allowance for support and maintenance, or, as has been said, a substitute for marital support.” 24 Am.Jur.2d, Divorce and Separation § 514 at 640-41 (1966) (footnotes omitted). See generally Olsen v. Olsen, 98 Idaho 10, 14-22, 557 P.2d 604, 608-616 (Shepard, J., dissenting).
It is apparent that the legislature would have intended that the benefits of the alimony statute should be extended to the excluded class, rather than taken from the benefitted class, and we should therefore extend those benefits in order that the legislative will, albeit not gifted with omniscience, should be carried out.
“If an important congressional policy is to be perpetuated by recasting unconstitutional legislation, the analytically sound approach is to accept responsibility for [the] decision. Its justification cannot be by resort to legislative intent, as that term is usually employed, but by a different kind of legislative intent, namely the presumed grant of power to the courts to decide whether it more nearly accords with Congress’ wishes to eliminate its policy altogether or extend it in order to render what Congress plainly did intend, constitutional. Welsh v. United States, 398 U.S. 333, 355-56, 90 S.Ct. 1792, 1804, 26 L.Ed.2d 308 (1970) (Harlan, J., concurring).
The Supreme Court in Orr implicitly recognized that alimony statutes are to be considered as providing a benefit to the receiver of the alimony when it stated that:
*724“It appears that Mr. Orr made no claim that he was entitled to an award of alimony from Mrs. Orr, but only that he should not be required to pay alimony if similarly situated wives could not be ordered to pay. It is therefore possible that his success here will not ultimately bring him relief from the judgment outstanding against him, as the State could respond to a reversal by neutrally extending alimony rights to needy husbands as well as wives.” 440 U.S. at 271-72, 99 S.Ct. at 1107-08 (emphasis added) (footnote omitted).
On remand from the Supreme Court, the Alabama Court of Appeals in fact responded to reversal by neutrally extending alimony rights to needy husbands as well as wives. Orr v. Orr, 374 So.2d 895 (Ala.Civ. App.1979), cert. denied, 374 So.2d 898 (Ala. 1979), appeal dismissed, 444 U.S. 1060, 100 S.Ct. 993, 62 L.Ed.2d 738 (1980). Similarly, in Beal v. Beal, 388 A.2d 72 (Me.1978), alimony benefits were neutrally extended to needy husbands by the court. Maine, like Idaho, had repealed and replaced the statute which allowed alimony only to wives. In deciding whether to construe the former statute so as to cure its constitutional shortcomings, the court in Beal stated:
“There are innumerable outstanding decrees awarding alimony, and those decrees are relied upon by the beneficiaries. Furthermore, those decrees serve the overriding legislative purpose, which is clearly to provide alimony in order to help preserve the economic status quo that existed during marriage. By its repeal and replacement of the alimony statute in 1977 the legislature has made it clear that as between abolishing alimony and making it available to husbands in appropriate cases, it would choose the latter. We conclude that the dominant legislative purpose of the alimony statute, as it stood when this action was brought, is correctly served by treating it as extending eligibility to men as well as women. This result is supported by well-reasoned commentary on this subject. Brown, Emerson, Falk & Freedman, The Equal Rights Amendment: A Constitutional Basis for Equal Rights for Women, 80 Yale L.J. 871, 912-20 (1971).” 388 A.2d at 76.
A similar result was reached in Peters v. Narick, 270 S.E.2d 760 (W.Va.1980), in which the court held that:
“Choosing between invalidation or neutral extension requires an ascertainment of the predominate legislative purpose underlying the statute’s enactment. Beal v. Beal, 388 A.2d 72 (Me.1978). That is to say, given the nature and substance of the statute, its legislative history, if any, considering it in the context of the larger domestic relations scheme of which it is a part, and considering the relevant economical, social, and historical implications, can it be validly concluded that benefits should be terminated to the class of persons who now benefit by the statute, i.e., women? We believe not. Clearly the legislative purpose embodied in the separate maintenance statute is to provide financial help to the dependent spouse and thereby preserve the economic status of the marriage pending further developments. This purpose would be thwarted by an invalidation of the statute, but by extending the statute’s benefits to men we conclude the legislative purpose would be effectuated.” 270 S.E.2d at 767.
See also Gomez v. Perez, 409 U.S. 535, 93 S.Ct. 872, 35 L.Ed.2d 56 (1973) (extending right to parental support to children of unwed parents); Harrigfeld v. District Court, 95 Idaho 540, 511 P.2d 822 (1973) (extending benefits of statutory definition of age of majority to eighteen year old males); Adkins v. McEldowney, 280 S.E.2d 231 (W.Va.1981) (extending right of illegitimates to inherit from both mother and father); Thomas v. Rutledge, 280 S.E.2d 123 (W.Va.1981) (extending same right to unemployment benefits to employee who voluntarily quits job to perform marital duties as is extended to employees who voluntarily quit for other reasons). See generally Ginsburg, Some Thoughts on Judicial Authority to Repair Unconstitutional Legislation, 28 Clev.St.L.Rev. 301 (1979).
*725Not only are the legislative purposes of former I.C. § 32-706 clearly served by holding that the benefits of alimony should be neutrally applied, but our legislature has also specifically acted to accomplish that very purpose. I.C. § 32-705, adopted in 1980 and set forth in note 1, supra, provides the benefits of alimony to needy spouses of either gender. The fact that the legislature chose to enact a new comprehensive scheme for divorce actions, a part of which scheme specifically extends eligibility for alimony to men as well as women, clearly tells us the continuing legislative intent as to the purposes of the alimony statute: Extend, do not abolish.
Finally, the potential harm of invalidating former I.C. § 32-706 cannot be overestimated. As pointed out in Lovell v. Lovell, 378 So.2d 418 (La.1979), in deciding to affirm an alimony award under a statute which the court in Lovell declared unconstitutional:
“Upon consideration of each of these factors, we conclude that our decision should not be applied retroactively. Our decision establishes a new principle of law by overruling clear past precedent on which litigants have relied. Innumerable divorced persons, both those paying and receiving alimony, have relied on the constitutionality of art. 160.... Moreover, retrospective application would undermine the objectives of art. 160. Finally, substantial inequity would result if prior judgments awarding alimony were declared invalid. It might well require new litigation in each case under the amended article in order to afford continued alimony payments. Also, it would subject divorced wives to suits by their former husbands seeking repayment of alimony paid by husbands under art. 160 prior to its amendment. Where a decision could produce substantial inequitable results if applied retroactively, there is ample basis for avoiding the ‘injustice or hardship’ by a holding of nonretroactivity.” 378 So.2d at 422.
The fact that havoc would result from voiding former I.C. § 32-706, and the fact that neutrally extending the benefits of alimony to needy husbands will not retroactively impose punishment or an economic or social hardship upon any class, strengthens our conclusion that, had the legislature initially considered the matter, it would have acted to extend the benefits of the alimony statute to needy husbands rather than abolish the statute altogether. We affirm the award in this case.5
III.
The second issue presented is whether the district court erred in awarding Myrna Murphey her attorney’s fees subsequent to the division of community property. Appellant also urges that if we conclude that the award of attorney’s fees was otherwise proper, we should invalidate the award because former I.C. § 32-704, which allows for awards of attorney’s fees to wives but not husbands, violates the equal protection clause of the United States Constitution and art. I, § 2 of the Idaho Constitution.
This Court held in Mifflin v. Mifflin, 97 Idaho 895, 556 P.2d 854 (1976), that attorney’s fees in divorce actions were community debts and were to be satisfied out of community property prior to division of the property. The court below, however, first divided the community property and then awarded Myrna Murphey her attorney’s fees out of what had become, by judicial decree, Robert Murphey’s separate property. This was error, the attorney’s fee award should have been subtracted from the net community estate prior to its division. On remand, the court will adjust the property distribution accordingly.
As to the constitutionality of former I.C. § 32-704, which was applicable to this action, our reversal of the award in question moots the issue. And, we do not perceive *726that it will arise again in this case if the trial court adheres to the teachings of Brammer v. Brammer, 93 Idaho 671, 471 P.2d 58 (1970), in which this Court held that attorney’s fees for either party in a divorce proceeding could properly be considered community debts, and therefore be satisfied out of community property.
If on remand the parties cannot arrive at an agreement regarding attorneys’ fees, the court may restructure the property award to accommodate any award of attorney’s fees which it may make, taking into account the services performed in this appeal.
The award of alimony is affirmed. The award of attorney’s fees is reversed and remanded for proceedings consistent with this opinion. Each party to bear his and her costs on appeal.
McFADDEN and DONALDSON, JJ., and W.E. SMITH, J., pro tern, concur. SHEPARD, J., dissents. McFADDEN, J., registered his vote prior to his retirement on August 31, 1982.. The equal protection clause of the Fourteenth Amendment of the Federal Constitution provides: “No state shall make or enforce any law which shall .. . deny to any person within its jurisdiction the equal protection of the laws.” U.S.Const. amend. XIV § 1.
. Id. Const, art. I, § 2 provides:
“Political power inherent in the people.— All political power is inherent in the people. Government is instituted for their equal protection and benefit, and they have the right to alter, reform or abolish the same whenever they may deem it necessary; and no special privileges or immunities shall ever be granted that may not be altered, revoked, or repealed by the legislature.”
. Alimony awards are now governed by I.C. § 32-705, which provides:
“Maintenance. — 1. Where a divorce is granted, for an offense of either spouse, including a divorce granted upon the complaint of the party at fault, the court may grant a maintenance order for the innocent spouse if it finds that the innocent spouse seeking maintenance:
(a) Lacks sufficient property to provide for his or her reasonable needs; and
(b) Is unable to support himself or herself through employment.
2. The maintenance order shall be in such amounts and for such periods of time the court deems just, after considering all relevant factors which may include:
(a) The financial resources of the spouse seeking maintenance, including the marital property apportioned to said spouse, and said spouse’s ability to meet his or her needs independently;
(b) The time necessary to acquire sufficient education and training to enable the spouse seeking maintenance to find employment;
(c) The duration of the marriage;
(d) The age and the physical and emotional condition of the spouse seeking maintenance;
(e) The ability of the spouse from whom maintenance is sought to meet his or her needs while meeting those of the spouse seeking maintenance;
(f) The tax consequences to each spouse.
. We recognized and applied this standard of review in Jones v. State Board of Medicine, 97 Idaho 859, 555 P.2d 399 (1976).
. The Court is aware of the Court of Appeals’ opinion in Neveau v. Neveau, 103 Idaho 707, 652 P.2d 655 (App.1982) No. 13896, which was filed on October 12, 1982. Our opinion was written prior to the filing of the opinion in Neveau; Neveau not yet being final we only mention and do not discuss it.