This is an appeal by intervenor-appellant, Arthur Voellinger, for himself and members of a certified class of retired police officers from an order and judgment entered on December 29, 1987 by the circuit court of the City of St. Louis denying refunds of contributions he and others made to the police retirement system prior to the effective date of a statute, effective September 28, 1981. On appeal, appellant-Voellinger claims that policemen who retired on and after September 28, 1981 are entitled to their refunds and denying refunds of contributions to those retiring before September 28, 1981 constitutes discrimination and a violation of equal protection of the laws. Since, under the law and judicial authorities we find no equal protection violation, we affirm the judgment.
I.
In 1981, the eighty-first general assembly adopted certain amendments to § 86.253, R.S.Mo.1986, relating to retirement allowances for policemen in the City of St. Louis. This bill was approved by the Governor and became effective September 28, 1981. Subsection 4 of § 86.253 provides in pertinent part:
* * ⅜ * ' ⅜ *
4. In addition to any other annuity or retirement allowance payable under this section and section 86.250, a member, upon retirement, shall be repaid the total amount of his contribution to the retirement system, without interest. The board [of trustees] shall pay the retired member such total amount of his contribution to the retirement system within sixty days after such retired member’s date of retirement....1
In 1984, the General Assembly and the Governor also approved H.B. 1103. Laws, 1984, p. 371. That bill, now § 86.366, R.S. Mo.1986 provides generally that the hoard of trustees may “by rule” adopt a program whereby, in addition to any other retirement allowance or compensation, any retir-ant who is receiving retirement benefits and “who retired prior to September 28, 1981,” shall, upon application be made a special advisor to the retirement system and “shall be paid as compensation for his services as special advisor a lump sum payment in an amount equal to the total amount of his contributions to the retirement system, without interest_” Subsection 2 provides that if the board adopts such a program, immediately after August 13,1984, the board shall establish a system of processing and approving qualified applicants for appointment and payment on a staggered basis. That section further provides that if the funds of the system are insufficient to pay such compensation without impairment of the funds, the compensation is to be reduced in the same proportion. Subsection 3, § 86.366, provides that any amounts , paid under this section shall be withdrawn from the funds of the retirement system and none shall be withdrawn from the general revenue fund of the city.
On October 4, 1984, the Police Retirement System of the City of St. Louis and its board of trustees, respondents here, filed its petition in the circuit court seeking a declaratory judgment with respect to their duties pertaining to § 86.366, supra. *300Specifically, the Retirement System sought a declaration as to whether the provisions of § 86.366 providing for the appointment of retirees who retired prior to September 28,1981 as “special advisors” at compensation set according to the retiree’s contribution were mandatory or directory and if mandatory, how the program was to be funded. In this posture of the case, appel-lantVoellinger, in his individual capacity and as representative of a class of retired officers, the St. Louis Police Veteran’s Association and certain officers,2 some of whom retired prior to and some after September, 1981, sought leave to intervene. On January 31,1985, Voellinger and others were granted leave to intervene. The court also sustained a motion that the action may be maintained as a class action under Rule 52.08, certified the class, and ordered a separate hearing on intervenor-Voellinger’s claims.
On April 20, 1987, judgment was entered on the petition filed by the Retirement System. The trial court adjudged that § 86.366 is permissive and directory, and not mandatory. No appeal was taken from that order.
On September 21, 1987, Voellinger filed his third amended petition. Therein he alleged that he maintains this action for himself and as representative of a class certified by the court; that he retired from the St. Louis Police Department on April 1, 1974 and that during his many years of service he regularly contributed to the police retirement system which accumulated to $11,458.03. He alleged that this amount was not returned to him. He also alleged that others; approximately 541, were in the same class and their contributions also were not returned,3 but that officers who retired after September 28, 1981 received their contributions they had made to the system. This distinction, he alleged, was based on official policy, and violated their civil rights pursuant to 42 U.S.C. § 1983. Voellinger prayed for a declaratory judgment declaring that § 86.253.4 be made applicable to all officers whether or not they retired prior to or after September 28, 1981, and that a classification distinguishing between officers who retired before September 28, 1981, and those who retire after is discriminatory without a rational basis. He contended therefore that the statute is unconstitutional, requested damages, and that contributions made to the retirement system be refunded.
On December 16, 1987, a separate hearing was held on intervenor-Voellinger’s third amended petition. Mr. Voellinger testified that he became a police officer on April 6, 1942 and retired April 1, 1974. During this time he contributed to the police retirement fund but had never received the return of his contribution. He did receive a monthly pension all during the time of his retirement, but did not apply, pursuant to statute, to be a “special advisor.”
There is no necessity to delve into the numerous, complicated and actuarial facts. A summary suffices.
The thrust of Voellinger’s evidence was that there was some $20,000,000 surplus in the benefit reserve fund according to the valuation balance sheet of September 30, 1981 which fund has grown since that time. There was also substantial testimony on certain assumptions used in the 1981 actuarial study and experience in subsequent years. Two of the assumptions used were an interest rate assumption and a salary scale assumption. While a seven percent interest rate assumption was used, the rate was actually larger, and while the salary increase assumption used was about 7.5% the actual increase was approximately 5.5%. A slight change in the assumption rates would have, it was contended, permitted repayment of contributions. The benefit consultant for Voellinger, an actuary, testified that in his opinion if the actuarial assumption was adjusted within reasonable limits, the system could have remained in balance.
The benefit consultant for the Retirement System testified that the system is *301funded by contributions by the members of the system and the city. The pool of money comes from several sources including contributions made. Contributions made by employees, plus investments based on certain assumptions provide a funding equation. In his opinion, if funds were withdrawn from the system in a lump sum, the requirement of the City would increase to keep the system in balance. All the funds must be viewed together. In his opinion, a refund of contribution would be a “benefit improvement,” an additional benefit paid above and beyond the service retirement benefit.
On December 29, 1987, the trial court entered its findings, order and judgment. The court found that Voellinger represents a class of individuals (or their heirs) who retired prior to September 28, 1981; that the police retirement system is a legal entity, and that the intervenor seeks declaratory relief and damages pursuant to § 86.253 which entitles retirees who retire on or after September 28, 1981 to recover their contributions, but no similar provision is made for those who retired prior to that date, and such distinction does not violate equal protection.
The court found a “rational basis” for providing a refund of lump-sum contributions to those officers retiring on and after September 28, 1981. To grant the benefit to retirees before that date “would create an unfunded liability upon the Retirement System the payment of which would constitute a ‘benefit’4 and would impair the funds” of the retirement system. The court further found that a return of the lump-sum contributions to pre-September 1981 retirees would increase the contribution required by the City to keep the pool of retirement funds intact to meet its liabilities, and that approximately $9 million dollars would be needed to make such lump-sum payments. Budget constraints and insuring the solvency of the system are included in the rational basis for different treatment. The court further found that it would be imprudent to change the “assumption rates” without a careful expensive study, and concluded that when dealing with pension systems, a difference in treatment will be upheld, if supported by a rational basis. The rational basis here is found in Art. Ill, § 39(3), Mo. Const, prohibiting the grant of “additional compensation” after services have been rendered.
The court therefore decreed that § 86.253.4, insofar as it classifies persons who retired prior to September 28, 1981 differently than persons who retired thereafter is constitutional under Missouri and federal law and does not violate 42 U.S.C. § 1983. Judgment was therefore rendered against appellant-intervenor, Voellinger.
In due time, Voellinger appealed contending that § 86.253.4 violates equal protection of the laws and discriminates between policemen retiring on or after September 28,1981 and those who retired prior to that date.5
On appeal, appellant contends that the trial court erred in denying the lump-sum refund of contributions made by policemen who retired prior to September 28, 1981 because (1) the Missouri Constitution, Art. Ill, § 39(3) does not prohibit such refunds and therefore making a distinction between policemen who retire before and after the effective date is not a rational basis for distinction, and (2) there is no evidence to support the court’s finding that such refunds would create an unfunded liability and impair the funds of the retirement system.
He argues that in enacting § 86.253.4, the general assembly did not draw any *302distinction as to who was to receive refunds, and the classification by the effective date of the statute, September 28, 1981, is not rationally related to any legitimate governmental interest. He contends that, while Art. Ill, § 39(3) limits the power of the general assembly to grant any extra compensation, fee or allowance to a public officer, the refund of contributions, “although an extra benefit,” or “withheld earned compensation” is not “extra compensation” within the meaning of the Constitution so that in being repaid their lump-sum contributions, police officers who retired prior to the effective date of § 86.253.4, would be getting “back monies already earned” and such monies would not therefore be extra compensation.
II.
Art. Ill, § 39(3) of the Missouri Constitution provides that:
The general assembly shall not have power:
* * * * * *
(3) To grant or to authorize any county or municipal authority to grant any extra compensation, fee or allowance to a public officer, agent, servant or contractor after service has been rendered or a contract has been entered into and performed in whole or in part; ... .6
Under the equal protection clause of the United States Constitution, unless a suspect class is involved or a right is deemed to be fundamental which requires strict scrutiny, a classification which has a rational basis does not violate equal protection. When social and economic legislation is challenged as being violative of equal protection, a classification or distinction does not violate the Constitution if the classification has some reasonable or rational basis. U.S.R.R. Retirement Bd. v. Fritz, 449 U.S. 166, 101 S.Ct. 453, 66 L.Ed.2d 368 (1980); Dandridge v. Williams, 397 U.S. 471, 90 5.Ct. 1153, 1161-1162, 25 L.Ed.2d 491 (1970). A state does not violate the Equal Protection Clause merely because the classifications made by its laws are imperfect. To pass constitutional muster the classification must bear some rational relationship to a legitimate state purpose. Under that test, the party challenging the constitutionality of the statute has the burden of proving that the statute denies equal protection and the legislation will not be set aside if any set of facts may be conceived to justify it. See Langston v. Levitt, 425 F.Supp. 642, 646 (S.D.N.Y.1977).
In U.S.R.R. Retirement Bd. v. Fritz, supra, the Supreme Court of the United States held that it was not constitutionally impermissible for Congress to draw lines between groups of employees for the purpose of phasing out railroad retirement benefits.
The rational basis test therefore is the appropriate standard in this case. O’Neil v. Baine, 568 S.W.2d 761 (Mo. banc 1978). In Muzquiz v. City of San Antonio, 520 F.2d 993 (5th Cir.1975), on reh., 528 F.2d 499 (1976), vac. 438 U.S. 901, 98 S.Ct. 3117, 57 L.Ed.2d 1144 (1978); on remand 586 F.2d 529 (1978), former policemen and firemen challenged the operation of the pension fund and sought refunds of amounts they had contributed to the system while they were serving and before becoming eligible for benefits. The court held that while it is true the plaintiffs were treated differently from other employees who did not contribute, the treatment was not irrational. Policemen and firemen cannot be considered a suspect class requiring strict scrutiny nor could their interest in recovering their contributions be thought of as some fundamental personal right. The court held that these plaintiffs were not entitled to refunds of their contributions, and requiring contributions from them had a rational relation to the funding of a system with better benefits than other state retirement plans.
In Langston v. Levitt, supra, 425 F.Supp. 642 (S.D.N.Y.1977), the court held that employees who were denied additional benefits and who were treated differently than employees who were veterans and residents of the state were not deprived of equal protection. A determination of the *303statute is shaped by the general rule that in the area of economics and social welfare, the State does not violate the Equal Protection Clause merely because the classification made by its laws are imperfect. The court held that in applying the proper test, the state had a legitimate interest in conferring benefits on its own residents who served in time of war.
In Hall v. Board of Trustees of Ark. Pub. Emp., Etc., 671 F.2d 269 (8th Cir.1982) the court held that employees who served less than five years could be treated differently without violating equal protection from those who served five years or longer. See also, Musser v. Morton, 639 F.2d 309 (6th Cir.1981) (pay differential between elected officials elected prior to 1976 and those elected after did not violate equal protection); Marsh v. Government of Virgin Islands, 431 F.Supp. 800 (D.C.Virgin Islands 1977) (classification of government employees for vacation leave solely on basis of date of entry into service does not violate equal protection).
Under the proper standard and the judicial authorities, we hold that a rational basis exists for differentiating between those policemen who retired prior to September 28, 1981 and those retiring on and after that date insofar as the refund of contributions is concerned. The above authorities make clear that classification between pre-1981 and post-1981 retirees does not violate equal protection. There are numerous reasons for our conclusion.
Authorities in Missouri hold that under Art. Ill, § 39(3), legislation may not grant a former employee increased “benefits” or “add on compensation” after the service is rendered, whether the increased benefits are denominated extra compensation, fees, allowances or benefits. There is therefore a rational basis for the legislation.
Appellant attempts to distinguish between “extra compensation” and “earned compensation” and argues that Art. Ill, § 39(3) prohibits awarding “extra compensation” but not “earned compensation.” He attempts to avoid the proscription of Art. Ill, § 39(3) by denominating the contributions to the retirement system as “earned compensation” rather than “extra compensation.” But the contributions in reality are not earned compensation; the contributions are part of the statutory scheme to provide a pool of money to pay retirement benefits to policemen who retire. The contributions made are part of the statutory agreement to provide pensions for retired officers who retire prior to September 28, 1981.
Appellant attempts to show that there is a sufficient $20 million surplus in the system to make refunds to retired officers and that small changes in assumptions of interest rates and increased wages would provide an additional surplus. But these matters are not determinative of the precise issue whether the retired officers would receive an increased or add-on benefit if their contributions were refunded and they continued to receive their statutory pension benefits. Those benefits are determined by statutory agreements and, unless changed by law, any increased or add-on benefits would be in violation of Art. Ill, § 39(3).
Whether a pension is regarded as a gratuity or deferred compensation, “adding” to the pension or retirement benefits after retirement, in the absence of express authority, constitutes an “extra” or “add on” benefit in violation of Art. III, § 39(3). Police Retirement System v. Kansas City, 529 S.W.2d 388, 391 (Mo.1975); State ex rel. Cleaveland v. Bond, 518 S.W.2d 649 (Mo.1975) (statute granting retirement benefits to judge who ceased to hold office prior to effective date of statute held unconstitutional); State ex rel. Phillip v. Public School Retirement System, 364 Mo. 395, 262 S.W.2d 569, 576 (Mo. banc 1953); Atchison v. Retirement Board of Police Retire. System, 343 S.W.2d 25, 34 (Mo.1960) (police officers who retired before time when police pension statutes were repealed and reenacted substituting a new formula were not entitled to have their pensions calculated by the new formula); 142 A.L.R. 938, 939 (1943); 60A Am.Jur.2d, Pensions and Retirement Benefits, § 1607 (1988); annot., 27 A.L.R.2d 1442; State ex rel. Sanders v. Cervantes, 480 S.W.2d 888 *304(Mo. banc 1972) (life insurance coverage for officers retiring after effective date of statute not covered). In State ex rel. Sanders v. Cervantes, supra, the Supreme Court noted that the relators have not asked the court to consider the validity of providing benefits to those policemen who retired pri- or to the effective date of the statute, and in that connection cited Kizior v. City of St. Joseph, Mo., 329 S.W.2d 605 (Mo.1959); Atchison v. Retirement Board of Police Retire. System, supra; State ex rel. Breshears v. Missouri State Employees Retirement System, 362 S.W.2d 571, 575 (Mo. banc 1962), and Art. III, § 39(3). In Breshears, supra, the court held that an increase in pensions as to retired members is retrospective and unconstitutional. “[W]e must and do hold that the increase so provided is unenforceable and void as to those members [of the state retirement system] who retired prior to October 13, 1961.”7 362 S.W.2d at 576.
Under these authorities and the express language of § 86.253.4, we believe it to be clear that appellant for himself and others is not entitled to a refund of contributions made to the retirement system. The controlling statutes in effect at the time appellant’s pension rights vested, expressed the monetary rights due appellant which included the contributions made to the system. Section 86.253.4 does not either expressly or by implication extend the rights to refunds of contribution to policemen who on the effective date of the act had retired from the service and whose rights had fully accrued and vested prior to the passage of the Act. See Atchison, supra, 343 S.W.2d at 34. The legislature in attempting to fill the void for those retirees who retired prior to September 28, 1981 adopted § 86.366 so that those persons could be compensated as special advis-ors in an amount equal to the amount of his contribution. Such legislation has been upheld. State ex rel. Dreer v. Public School Retirement System, 519 S.W.2d 290 (Mo.1975).
Therefore, to comply with the provisions of the Constitution, § 86.253.4 in authorizing refunds of contributions to those policemen who retire on an after September 28, 1981 and denying such refunds to those already retired constitutes a rational basis for the legislation and does not offend equal protection. In so holding the trial court did not err.
There is a rational basis in distinguishing between officers who retire before and after the effective date because the contributions made are part of the pool of money to provide pension benefits to those retirees. The contributions made are used to help fund the retirement system, and if appellant and others were refunded their contributions in toto, and still receive benefits, part of which is funded by their contributions, they would be receiving add-on benefits from the system. Thus the statute has a rational basis for granting refunds only to those who retire after 1981. Voellinger admitted that he received approximately $91,000 since his retirement, part of which was the contributions made. In the event of death, his beneficiary or estate would receive a benefit up to the full amount of his contributions.
Furthermore, the plain language of § 86.253.4 provides that policemen are to be refunded their contributions upon retirement. This language is applicable to those who retire in the future, not to those who have already retired.
Finally, the contributions made by appellant and those whom he represents were not “earned compensation” because their “contracts” for service did not include any provision to return the contributions made. If appellant receives a refund of contribution and also receives the same amount of pension, then he and others in a similar situation, are receiving not only their contributions, but a pension which is partially funded by contributions, hence they would receive an amount in excess of what they had agreed to work for and would be receiving add-on benefits for which they have not worked, thus violating Art. Ill, § 39(3). *305The rational basis for distinguishing those police officers who retired prior to September, 1981, and those who retire after that date is that during the times they were employed, they were employed under an agreed compensation. For those retired prior to 1981 the agreed benefits, under the statutes, did not include a provision for refunding contributions. For those who retire subsequent to that date the agreed benefits under existing statutes includes a provision for refunds. The services of those who retired prior to 1981 were rendered under statutes in existence at that time.
In sum, there is no invidious discrimination violating the equal protection clause under § 86.253.4 by not refunding contributions to police officers who retired prior to the effective date of § 86.253.4.
In his second point, appellant contends that the trial court erred in refusing to return the lump-sum contribution because there was no evidence to support its finding that such repayments would create an unfunded liability or impair the funds of the system, hence no rational basis exists for distinguishing between retirees before and after 1981.
The argument goes that there was evidence to show that there was a $20 million dollar difference in figures for the liabilities for members already retired and those entitled to future benefits. Further, the two major assumptions used in the valuation of the retirement system — interest rate assumption and salary rate increase assumption would have decreased the amount of liabilities of the fund and made it possible to refund the contributions.
But there was sufficient evidence from witnesses that if an amount was withdrawn from the system in a lump-sum, the City would be required to increase its contributions in order to keep the system in balance. There was other evidence that the system would be impaired. The trial court did not err in finding that repayment of the contributions would impair the fund, and did not err in refusing to change the assumption rates without a careful experience study.
Under the principles of Murphy v. Carron, 536 S.W.2d 30 (Mo. banc 1976), the trial court did not err. There was substantial evidence to support the judgment; it did not erroneously declare or apply the law, and the judgment was not against the weight of the evidence.
The judgment is affirmed.
DOWD, P.J., and SIMON, J., concur.. Subsection 5 of the same Act provides that “[a]ny person who is receiving retirement benefits from the retirement system, upon application to the board of trustees, shall be made, constituted, appointed and employed by the board of trustees as a special consultant.... For such services he or she shall be compensated monthly, in an amount which, when added to any monthly retirement benefit ... shall, ... total four hundred dollars; _”
. Robert Griffin, Edward Harper, Edmund Morgan, Frank Eresh, James McGauley and William Homan.
. Amounting to approximately 55,300,000.
. The court did not use the term "extra compensation.”
. In this appeal the City contends that the inter-verior-appellant is challenging the validity of § 86.253.4, hence the jurisdiction of this appeal is properly within the exclusive jurisdiction of the Supreme Court. Art. V, § 3, Mo. Const. The City has therefore moved to dismiss the appeal or in the alternative to transfer the case to the Supreme Court. The motion was taken with the case. It is now denied. This appeal does not involve the validity of the statute but the proper application of the statute as to whether it is applicable only to policemen who retire on or after September 28, 1981. It is not the validity of the statute that is being challenged; it is the application of the statute.
. Art. I, § 13 prohibits retroactive legislation.
. The court also noted that payment of increased benefits to retired members whose status was fixed would deplete the fund to a substantial extent. 362 S.W.2d at 576.