
599 P.2d 874 (1979)
Arthur JEFFREY, on behalf of himself and all others similarly situated, Plaintiffs-Appellants, Cross Appellees,
v.
COLORADO STATE DEPARTMENT OF SOCIAL SERVICES, Henry A. Foley, Executive Director of the Colorado State Department of Social Services, Gilbert R. Slade, Ms. Margaret Marshall, Manuel M. Diaz, John H. Fowler, Thomas C. Hickman, Ms. Joanne Paterson, James A. Vincent, Ms. Florangel Mendez, and Chester Watson, as constituting the Colorado Board of Social Services; and Alfred L. Gillen, Executive Director of El Paso County Department of Social Services, their agents, employees, successors in office, assistants and all other persons acting in concert or cooperation with them or at their direction or under their control, Defendants-Appellees, Cross Appellants.
Clifford SALTER, on behalf of himself and all others similarly situated, Plaintiffs-Appellants, Cross Appellees,
v.
The COLORADO STATE DEPARTMENT OF SOCIAL SERVICES, Armando R. Atencio, individually and in his official capacity as Executive Director of the Colorado State Department of Social Services, Gilbert R. Slade, Ms. Margaret Marshall, Manuel L. Diaz, John H. Fowler, Thomas C. Hickman, Ms. Joanne Paterson, James A. Vincent, Ms. Florangel Mendez, and Chester Watson, individually and as constituting the Colorado Board of Social Services; and Eugene McKenna, individually and as Executive Director of Weld County Department of Social Services, their agents, and employees, successors in office, assistants and all other persons acting in concert or cooperation with them or at their direction or under their control, Defendants-Appellees, Cross Appellants.
No. 28405.
Supreme Court of Colorado, En Banc.
August 20, 1979.
Rehearing Denied September 17, 1979.
*875 *876 John R. Holland, Legal Aid Society of Metropolitan Denver, Denver, Zane Pic, Colorado Rural Legal Services, Inc., Greeley, Charles Johnson, Pikes Peak Legal Services, Inc., Colorado Springs, Maurice Znaizer, Senior Citizens Law Center, Denver, Dudley P. Spiller, Jr., Colorado Coalition of Legal Service Programs, Denver, for plaintiffs-appellants, cross appellees.
J. D. MacFarlane, Atty. Gen., Richard F. Hennessey, Deputy Atty. Gen., Edward G. Donovan, Sol. Gen., Henry L. Solano, Asst. Atty. Gen., Human Resources Section, Denver, for defendants-appellees, cross appellants.
LEE, Justice.
The plaintiffs-appellants appeal from the district court's judgment upholding the denial of old-age pension benefits by the Colorado State Department of Social Services. We reverse.
The appellants are all between the ages of sixty and sixty-five. Their applications for old-age pension benefits were denied solely on the ground that they had not resided in Colorado for a continuous period of thirty-five years immediately preceding application for benefits as required by section 26-2-111(2)(a)(II), C.R.S.1973. Following the adverse agency determination, the appellants sought judicial review under the Administrative Procedure Act, section 24-4-106, C.R.S.1973, declaratory and injunctive relief pursuant to C.R.C.P. 57 and 65, and relief pursuant to 42 U.S.C. § 1983. The trial court also certified the case as a class action encompassing all residents of Colorado between the ages of sixty and sixty-five who are otherwise eligible for the old-age pension but who cannot meet the thirty-five-year continuous durational residency requirement.
The Old Age Pension amendment to the Colorado Constitution, section 3 of Article XXIV, in pertinent part provides:
"From and after January 1, 1957, every citizen of the United States who has been a resident of the state of Colorado for such period as the general assembly may determine, who has attained the age of sixty years or more, and who qualifies under the laws of Colorado to receive a pension, shall be entitled to receive the same * * *."
Pursuant to the authority granted, legislation was enacted by the General Assembly implementing the Old Age Pension amendment. The eligibility requirements with which we are here concerned are set forth in section 26-2-111(2)(a)(I) and (II), C.R.S.1973, and provide:
"(a) Public assistance in the form of the old age pension shall be granted to any person who meets the requirements of subsection (1) of this section and any one of the following requirements:
"(I) He has attained the age of sixty-five years or more;
"(II) He has attained the age of sixty years but has not reached the age of sixty-five, and he has resided in the state of Colorado continuously thirty-five years immediately preceding the date of application for the old age pension. * * *"
*877 The appellants' basic contention is that section 26-2-111(2)(a)(II), C.R.S.1973, is unconstitutional as violative of the equal protection clause of the United States Constitution because it established invidious classifications which operate to penalize the constitutionally protected right to travel. We agree.
Section 3 of Article XXIV of the Colorado Constitution establishes the right to an old-age pension subject to residency requirements as determined by the General Assembly. Section 26-2-111(2)(a)(I), C.R.S.1973, makes anyone sixty-five years or older eligible for the pension, regardless of length of residency.[1] Section 26-2-111(2)(a)(II), C.R.S.1973, makes eligible anyone who "has attained the age of sixty years but has not reached the age of sixty-five, and he has resided in the state of Colorado continuously thirty-five years immediately preceding the date of application for the old age pension."[2]
Section 26-2-111(2)(a)(II), therefore, establishes two classes of needy citizens between the ages of sixty and sixty-five, indistinguishable from each other except that one is composed of residents who have resided continuously in Colorado for thirty-five years, and the second of residents who have resided in Colorado less than thirty-five continuous years. We hold that such a classification, which works to deny critically needed old-age pension benefits to those who have resided in Colorado less than thirty-five continuous years, is unconstitutional as violative of equal protection.

I.
Traditional equal protection analysis is two-tiered. All classifications are subject to the standard of rationality, which tests whether the distinction between ostensibly similar classes has a reasonable basis and is rationally related to a legitimate legislative objective. Winkler v. Colorado Department of Health, 193 Colo. 170, 564 P.2d 107 (1977); Petrafeck v. Industrial Commission, 191 Colo. 566, 554 P.2d 1097 (1976). If the classification has some reasonable basis, it is not constitutionally infirm simply because it is not made with mathematical nicety or because in practice it results in some inequality. Harding v. Industrial Commission, 183 Colo. 52, 515 P.2d 95 (1973).
In addition, however, when a statute affects a fundamental interest or employs a suspect classification, the strict scrutiny test applies. This test requires a clear showing that the burden imposed by the classification is necessary to further a compelling governmental interest. Oregon v. Mitchell, 400 U.S. 112, 91 S.Ct. 260, 27 L.Ed.2d 272 (1970); Cowan v. Aspen, 181 Colo. 343, 509 P.2d 1269 (1973).
Although no suspect classification has been established by the challenged statute, we agree with the appellants' contention that the continuous durational residency requirement penalizes the fundamental right to travel, under the principles announced in Shapiro v. Thompson, 394 U.S. 618, 89 S.Ct. 1322, 22 L.Ed.2d 600 (1969) and Memorial Hospital v. Maricopa County, 415 U.S. 250, 94 S.Ct. 1076, 39 L.Ed.2d 306 (1974), and thus the statute is constitutionally infirm.
In Shapiro, the United States Supreme Court declared unconstitutional one-year durational residency requirements for receipt of welfare benefits. Fundamental to the decision was the concept that the residency requirements "denied welfare aid upon which may depend the ability of the families to obtain the very means to subsist *878 * * *." Because of the importance of the denied aid, the Supreme Court held that the waiting period provisions served to "penalize" the exercise of the right to travel and could only be constitutionally justified if such provisions promoted a compelling state interest.
In Memorial Hospital, the United States Supreme Court declared unconstitutional a one-year durational residency requirement for free nonemergency medical care. In doing so, the Supreme Court recognized that the parameters of the Shapiro "penalty" analysis have not been clearly defined, but held that "medical care is as much `a basic necessity of life' to an indigent as welfare assistance. And, governmental privileges or benefits necessary to basic sustenance have often been viewed as being of greater constitutional significance than less essential forms of governmental entitlements."
The keystone to the penalty analysis, therefore, is the relative importance of the individual interest which is initially infringed upon by imposition of a waiting period. The level of importance which triggers the penalty upon the right to travel, however, as noted in Memorial Hospital, has not been adequately delineated. But it is clear that deprivation of basic necessities through the application of durational residency requirements is a threshold. The question becomes whether denial of old-age pension benefits amounts to a denial of basic necessities. In our view, it does.

II.
Statutory authority for the old-age pension program is found in Title 26, Article 2 of the Colorado Revised Statutes, entitled "Colorado Public Assistance Act." The purpose of the article, as expressed in section 26-2-102, C.R.S.1973, is "* * * to promote the public health and welfare of the people of Colorado by providing * * * public assistance for needy individuals and families who are residents of the state and whose income and property are insufficient to meet the costs of necessary maintenance and services as determined by the state department [of Social Services] * * *." Section 26-2-103(7), C.R.S.1973, expressly states that " * * * Public assistance includes programs for old age pensions * *." A person is eligible for old-age pension benefits on the basis of need if "[h]e has insufficient income, property, or other resources to meet his needs as determined pursuant to rules and regulations of the state department." Section 26-2-111(1)(b), C.R.S.1973. The Department of Social Services defines need as "the difference between total income in cash or in kind of an individual or family and their requirements."[3]
Significantly, however, section 26-2-114(2)(b)(I), C.R.S.1973, provides that "[t]he amount of net income from whatever source, either in cash or in kind, which any person qualified for an old age pension may receive shall be deducted from the amount of monthly pension which such person would otherwise receive." Net income does not include income earned by the recipient up to the maximum extent allowed by Title I, section 2, of the Social Security Act. Section 26-2-114(2)(b)(II), C.R.S.1973.
Thus, the amount of net income from any source (including other welfare programs) over and above the income earned by the recipient up to the maximum extent allowed by Title I, section 2, of the Social Security Act, is deducted from the old-age pension benefits a recipient would otherwise receive. It is apparent that if the pension program was intended to do more than assist recipients in achieving a basic subsistence level, income from other sources would not be deducted from the amount of pension benefits. The old-age pension, therefore, as is evident from the implementing legislation, was designed to assist needy individuals over the age of sixty years in securing basic life necessities.
*879 The appellees attempt to avoid the strict scrutiny-compelling state interest test mandated by Shapiro by characterizing the oldage pension program as an "annuity." However, unlike true annuity or pension programs which are unaffected by a recipient's other income, the old-age pension benefit is directly and proportionally reduced by the amount of other income. Thus, the characterization of the old-age pension program as an "annuity" puts form over substance and disregards the nature of the program, which is to fulfill basic needs and not to supplement separate income.
We do not perceive any significant difference between the penalty imposed upon the right to travel by denial of old-age pension benefits based on durational residency requirements and the penalty imposed by a similar denial of such governmental benefits as Supplemental Security Income benefits, 42 U.S.C. § 1381 et seq., Aznavorian v. Califano, 440 F.Supp. 788 (S.D.Cal.1977); Iowa old-age assistance, Sheard v. Department of Social Welfare, 310 F.Supp. 544 (N.D.Iowa E.D.1969); public housing, King v. New Rochelle Municipal Housing Authority, 442 F.2d 646 (2d Cir. 1971); Cole v. Housing Authority of City of Newport, 435 F.2d 807 (1st Cir. 1970); public employment, Nehring v. Ariyoshi, 443 F.Supp. 228 (D.Haw.1977); Carter v. Gallagher, 337 F.Supp. 626 (D.Minn.1971); State v. Wylie, 516 P.2d 142 (Alaska 1973); Eggert v. City of Seattle, 81 Wash.2d 840, 505 P.2d 801 (1973); and veteran public assistance benefits, Strong v. Collatos, 450 F.Supp. 1356 (D.Mass.1978); Barnes v. Board of Trustees, Michigan Veterans Trust Fund, 369 F.Supp. 1327 (W.D.Mich.1973).
Because we hold that the challenged classification penalizes the right to travel, it can be justified only by a compelling governmental interest. The only justification suggested by the appellees is the legislative purpose in rewarding longstanding citizens' contributions to the state. This "contributory" rationale was rejected in both Shapiro and Memorial Hospital as a constitutionally impermissible state objective. In Shapiro, supra, the Supreme Court stated:
"Appellants argue further that the challenged classification may be sustained as an attempt to distinguish between new and old residents on the basis of contribution they have made to the community through the payment of taxes. * * * Appellants' reasoning would logically permit the State to bar new residents from schools, parks, and libraries or deprive them of police and fire protection. Indeed, it would permit the State to apportion all benefits and services to the past tax contributions of its citizens. The Equal Protection Clause prohibits such an apportionment of state services.
"We recognize that a State has a valid interest in preserving the fiscal integrity of its programs. It may legitimately attempt to limit its expenditures, whether for public assistance, public education, or any other program. But a State may not accomplish such a purpose by invidious distinctions between classes of its citizens. It could not, for example, reduce expenditures for education by barring indigent children from its schools. Similarly, in the cases before us, appellants must do more than show that denying welfare benefits to new residents saves money. The saving of welfare costs cannot justify an otherwise invidious classification.
"In sum, neither deterrence of indigents from migrating to the State nor limitation of welfare benefits to those regarded as contributing to the State is a constitutionally permissible state objective." Shapiro v. Thompson, 394 U.S. 618 at p. 632, 89 S.Ct. 1322 at p. 1330, 22 L.Ed.2d 600.
The appellees, therefore, have failed to constitutionally justify the classification created by the thirty-five-year continuous durational residency requirement by showing a compelling state interest.

III.
Our views are fortified by reference to the historical background of the adoption of the old-age pension amendment, as shown by the record before us. No intention was demonstrated by the framers of the amendment *880 that persons over the age of sixty years should be classified in age groups those sixty to sixty-five years of age, and those over sixty-five years of age. Nor is there any indication of any intention that an age group classification of sixty to sixty-five years should be further subclassified on a durational residency basis, as was done by the General Assembly.[4] The people mandated through the adoption of Article XXIV " * * * every citizen of the United States who has been a resident of the state of Colorado for such period as the general assemby may determine, who has attained the age of sixty years or more, and who qualifies under the laws of Colorado to receive a pension, shall be entitled to receive the same * * *." (Emphasis added.)
It is important to note that Article XXIV does not mandate durational residency as a requirement for eligibility to receive a pension, but merely permits the General Assembly to impose such a requirement, if it chooses. Of course, any durational residency qualification that may be imposed by the legislature must not be inconsistent with the equal protection limitations of the United States Constitution as interpreted by the Supreme Court, as hereinbefore discussed. Furthermore, a durational residency requirement must be reasonably designed only for such a period as will permit the agencies which administer the old-age pension funds to process applications for pension benefits and to assure that those who apply for benefits do in fact meet the other qualifications for eligibility imposed by section 26-2-111, C.R.S.1973.[5]

IV.
Having declared the thirty-five-year durational residency requirement to be void, we now determine, by applying the standards of construction set forth in section 2-4-204, C.R.S.1973, which concerns severability of statutory provisions, that the offending provisions of section 26-2-111, C.R.S.1973, are severable. We find that the valid provisions are in no way "essentially and inseparably connected with" or "dependent upon" the severed provisions. The remaining valid provisions of the statute, standing alone, are complete and functionally capable of being executed. We now declare unconstitutional and inoperable all words in section 26-2-111(2)(a)(II), C.R.S. 1973, after the words "sixty years" in subparagraph (II), commencing with the word "but" through the end of the sentence.

V.
Appellants urge that we grant retroactive pension benefits. We are not constitutionally required to do so. Linkletter v. Walker, 381 U.S. 618, 85 S.Ct. 1731, 14 L.Ed.2d 601 (1965); Ruark v. People, 158 Colo. 110, 405 P.2d 751 (1965). Nor do we think this is a proper case in which to grant retroactive relief. In our view, practical considerations require that the declaration of unconstitutionality here be applied prospectively only, in order that stability in the administration of the old-age pension fund not be unduly disturbed or impaired. We deem it important that the General Assembly, which has relied for many years on the ostensible validity of the durational residency requirement of the statute, not be unnecessarily hampered in its fiscal planning and budgeting, a result which most certainly would occur if this ruling were made retrospective. We therefore hold that the ruling of unconstitutionality is prospective only.


*881 VI.
On cross-appeal, the Colorado State Department of Social Services asserts as error: the district court's certification of the action as a class action; the propriety of allowing injunctive and declaratory relief in conjunction with Administrative Procedure Act review; and the propriety of 42 U.S.C. § 1983 relief when adequate state remedies exist.
Because of our disposition on constitutional grounds and the prospectivity of this holding, analysis of the propriety of the class certification by the district court is unnecessary.
Likewise, given our disposition on constitutional grounds, it is immaterial that the appellants were procedurally incorrect in seeking injunctive and declaratory relief in conjunction with Administrative Procedure Act review. Section 24-4-106(7), C.R.S.1973, in pertinent part provides: "If [the court] finds that the agency action is * * contrary to constitutional right * * * then the court shall hold unlawful and set aside the agency action and shall restrain the enforcement of the order or rule under review * * *." Thus, section 24-4-106(7), C.R.S.1973, in effect, allows for declaratory and injunctive relief as part of the Administrative Procedure Act review.
Finally, as to the alleged error of the trial court in overruling the appellees' objection to the joinder of the claim for relief under 42 U.S.C. § 1983 with the Administrative Procedure Act review, in view of our holding of unconstitutionality, we find no discussion of that issue necessary.
The judgment is reversed and the cause is remanded to the district court with directions to vacate its order dismissing the complaint, and to enter judgment in favor of appellants, consistent with the views herein expressed.
DUBOFSKY, J., does not participate.
NOTES
[1]  The initial legislation implementing the amendment required that those who had attained the age of sixty-five years or more must have resided in Colorado for at least five years within the nine years immediately preceding the date of application for a pension. CSA, C. 119, section 28(4). This five-year residence requirement was eliminated by the enactment in 1973 of section 26-2-111(2)(a)(I).
[2]  The thirty-five-year resident eligibility requirement for those between the age of sixty and sixty-five years has been a continuous requirement since the adoption of the initial implementing legislation. CSA, C. 119, section 28(4).
[3]  At the time of the hearing in the district court, the then current $235 monthly old-age pension was designed to fulfill requirements in the critical areas of food ($49), clothing ($17), shelter ($73), utilities ($32), household supplies and equipment ($8), insurance ($3), medicine chest ($6), transportation ($8), and personal needs ($37).
[4]  The legislative motivation in establishing the classes and subclasses apparently was to avoid what some members of the General Assembly viewed as a grave threat to the fiscal integrity of the state government. As a matter of fact, the fears of a dire monetary impact on the state by reason of the old-age pension program have never materialized. The record demonstrates that for the fiscal year ending June 30, 1977, revenues allocable to the old-age pension fund totaled $353,933,577, whereas the pension fund needs, in all of its aspects, amounted to only $13,949,043. Thus, under the Act $339,984,534 spilled over into the general fund.
[5]  There apparently has been no problem in processing the applications of those over sixty-five years of age for whom no durational residency requirement has been imposed.
