This appeal arises from proceedings before the Board of Tax Appeals (BOTA) in which the Garden City Medical Clinic (Clinic) sought relief for Finney County’s erroneous taxation of the Clinic’s computer applications software during 1998, 1999, and 2000. The Clinic challenges BOTA’s limiting its tax refund to only the year immediately preceding the year in which it filed its refund application. While we are not persuaded by the Clinic’s equal protection claim, its due process claim has merit. Accordingly, we reverse.
During 1995 and 1996 the Clinic purchased computer software for use in its business. It discovered in 2002 that it had been paying taxes to Finney County on this software when it was not subject to taxation. Consequently, in November 2002, the Clinic filed with BOTA an exemption application for the years 1996 and thereafter. It also sought a refund from Finney County of taxes paid for 1998, 1999, and 2000, in the amount of $9,161.08.
The computer applications software was specifically referred to in the Clinic’s application. In its recommendations and comments, a procedure mandated by K.S.A. 2003 Supp. 79-213(d), the county appraiser noted that “there is no exemption for applicational software. Applicational software has been determined by the courts to be intangible property.” By this, the appraiser apparently was referring to In re Tax Protest of Strayer, 239 Kan. 136, 143, 716 P.2d 588 (1986), in which our Supreme Court determined that while operating system software is taxable tangible personal property, applications software is intangible and not subject to tax. In es*116sence, the appraiser was asserting that the applications software, which is not subject to tax, is-not the proper subject for an exemption application.
At the time the Clinic filed its application, K.S.A. 2002 Supp. 79-213(k), which applied to the 1996 tax year and thereafter, provided:
“In conjunction with its authority to grant exemptions, the board shall have the authority to abate all unpaid taxes that have accrued from and since the effective date of the exemption. In the event that taxes have been paid during the period where the subject property has been determined to be exempt, the hoard shall have the authority to order a refund of taxes for a period not to exceed three years.” (Emphasis added.)
Finney County requested a hearing, which was scheduled for August 29, 2003. In the meantime, on July 1, 2003, the legislature amended K.S.A. 79-213(k) so as to limit tax refunds to the year immediately preceding tire year in which die exemption application is filed. K.S.A. 2003 Supp. 79-213(k); L. 2003, ch. 156, sec. 3. The legislature declared that this amendment applied to all applications filed after 2001. K.S.A. 2003 Supp. 79-213(n); L. 2003, ch. 156, sec. 3. This would include the Clinic’s application filed in November 2002.
Following the August 2003 hearing, which Finney County did not attend, BOTA issued its order in July 2004 in which, among other things, it found (as Finney County had earlier conceded) that the Clinic’s applications software constituted intangible personal property and was, therefore, exempt from taxation. However, because of the July 2003 amendment to K.S.A. 79-213(k), BOTA limited the Clinic’s tax refund to tire year immediately preceding the year in which the application was filed and rejected its claim for refunds for taxes paid in 1998, 1999, and 2000.
The Clinic sought reconsideration by BOTA, arguing that its retroactive application of the amended K.S.A. 79-213(k) was unlawful. When BOTA denied the motion, this appeal followed.
The Clinic claims that BOTA’s retroactive application of K.S.A. 2003 Supp. 79-213(k) is an unconstitutional denial of due process and equal protection under both the Kansas and United States Constitutions by eliminating its vested right to a remedy for wrong*117fully collected taxes and by creating an impermissible classification of taxpayers. Since BOTA did not have the authority to consider this constitutional challenge to the statute, that task now falls upon us. Since the issue is one of law, the scope of our review is unlimited. In re Tax Appeal of CIG Field Services Co., 279 Kan. 857, Syl. ¶ 3, 112 P.3d 138 (2005).
Due Process
The constitutionality of K.S.A. 79-213(k) is presumed, and we must resolve all doubts in favor of its validity. “[I]t is the court’s duty to uphold a statute under attack, if possible, rather than defeat it, and if there is any reasonable way to construe the statute as constitutionally valid, that should be done.” State ex rel. Stephan v. Lane, 228 Kan. 379, Syl. ¶ 1, 614 P.2d 987 (1980).
In considering this claim, we start with the fundamental rule that a statute cannot be applied retroactively to take away vested rights. Our Supreme Court has considered this issue in the context of a number of claimed rights. See Owen Lumber Co. v. Chartrand, 276 Kan. 218, 73 P.3d 753 (2003) (involved the claimed right to rely on the current statutory notice requirements in foreclosing a mechanic’s hen); Resolution Trust Corp. v. Fleischer, 257 Kan. 360, 892 P.2d 497 (1995) (involved the claimed right to a cause of action in tort for breach of fiduciaiy duty by officers and directors of savings and loan associations); Rios v. Board of Public Utilities of Kansas City, 256 Kan. 184, 883 P.2d 1177 (1994) (involved the claimed right to have a worker’s compensation appeal heard by the district court rather than the Board of Workers Compensation); Smith v. Printup, 254 Kan. 315, 866 P.2d 985 (1993) (involved the claimed right to punitive damages); Harding v. K.C. Wall Products, Inc., 250 Kan. 655, 831 P.2d 958 (1992) (involved the claimed right to assert the defense that a claim is barred by the statute of repose); Board of Greenwood County Comm’rs v. Nadel, 228 Kan. 469, 618 P.2d 778 (1980) (involved the claimed right in a judgment still subject to review); State ex rel. Schneider v. Liggett, 223 Kan. 610, 576 P.2d 221 (1978) (involved the claimed right to practice medicine without malpractice coverage); State, ex rel., v. School District, 163 Kan. 650,185 P.2d 677 (1947) (involved the claimed right *118to existing school district boundaries); Brown v. City of Topeka, 146 Kan. 974, 74 P.2d 142 (1937) (involved the claimed right to an existing street name); Bowen v. Wilson, 93 Kan. 351, 14 Pac. 251 (1914) (involved the claimed right to an appeal); Wheelock v. Myers, 64 Kan. 47, 67 Pac. 632 (1902) (involved the claimed right to an existing rule of evidence).
While these and other Kansas cases have considered the possible impact of retroactive legislation on vested rights in a multitude of settings, none directly involves a taxpayer s claim of a vested right to a tax refund. There have been, however, Kansas cases involving retroactive tax legislation. In the area of property tax law, a legislative change during the pendency of property tax litigation was given retroactive effect in In re Tax Appeal of American Restaurant Operations, 264 Kan. 518, Syl. ¶ 7, 957 P.2d473 (1998). However, in American Restaurant the taxing authority was the aggrieved party rather than the taxpayer, and the court was not called upon to consider the constitutional due process issue whether the legislation affected vested rights.
In another tax case, Board of Greenwood County Comm’rs v. Nadel, the court considered whether legislation which retroactively gave the County the right to appeal an adverse decision impaired the rights of the taxpayer who prevailed at trial. The Nadel court found that the legislative change was procedural rather than substantive and, therefore, did not affect the taxpayer s vested rights. 228 Kan. at 475.
While the cases routinely speak in terms of substantive versus procedural legislation and vested versus nonvested rights, tire court in Fleischer instructs us to look beyond these labels and consider the following factors: “(1) the nature of the rights at stake (e.g., procedural, substantive, remedial), (2) how the rights were affected (e.g., were the rights partially or completely abolished by the legislation; was any substitute remedy provided), and (3) the nature and strength of the public interest furthered by the legislation. [Citation omitted.]” Fleischer, 257 Kan. at 369.
In Chartrand, the court noted the following by one commentator:
*119“ ‘[T]he relevant factor in determining the weight to be given to the extent to which a preexisting right is abrogated is not whether the statute abolishes rights or remedies, but rather the degree to which the statute alters the legal incidents of a claim arising from a preenactment transaction; the greater the alteration of these legal incidents, the weaker is the case for the constitutionality of the statute.’ Hochman, The Supreme Court and the Constitutionality of Retroactive Legislation, 73 Harv. L. Rev. 692, 711-12 (I960).” Chartrand, 276 Kan. at 223.
The Chartrand court further observed:
“[W]ithout specifically articulating so, even in the situation of remedial or procedural statutes, Kansas appellate courts have looked beyond the nature of the statute (procedural, remedial, or substantive) and examined how the rights were affected, whether there was a substitute remedy, and the public interest furthered by the legislation.
“In each of these cases, without articulating the considerations, we have balanced the factors articulated in Fleischer by weighing the remedial or procedural nature of the statute against die determination of how rights were affected and whether any substitute remedy was provided. See Fleischer, 257 Kan. at 369.” Chartrand, 276 Kan. at 225, 227.
The court in Chartrand determined that strict retroactive application of changes in tire law with respect to giving notice in a mechanic’s hen foreclosure case violates due process. In doing so, the court found: (1) the lien had attached and suit had been filed before the statute changed; (2) the lienholder complied with the notice requirements in effect when the foreclosure action commenced; (3) the statutory amendment did not give the lienholder a reasonable time to comply with the new notice requirement; and (4) while there were other means by which the lien creditor could collect against the property owner, the theory underlying the Hen law is to charge the improved property for the cost of tire improvements. 276 Kan. at 227-28.
Using the principles of Chartrand and Fleischer as a guide, we turn to the Clinic’s due process claim. First, we consider the rights that were affected. It is important to note that the Clinic’s claim is not founded upon aspects of the tax law that involve the availability of a tax deduction or a tax credit to the taxpayer. Here, the Clinic’s right affected by the 2003 amendment to K.S.A. 79-213(k) is for reimbursement of taxes collected by tire County on property that *120was not subject to taxation. This distinguishes this case from the facts presented in United States v. Carlton, 512 U.S. 26, 129 L. Ed. 2d 22,114 S. Ct. 2018 (1994), which we will discuss later. The Clinic’s right to a refund under existing law was conceded by the County at the outset of the proceedings, which predated the 2003 amendment to K.S.A. 79-213(k). The Clinic’s entitlement to relief prior to the amendment was based on uncontested facts.
Next, we examine how those rights were affected. In November 2002, when the Clinic applied for a refund, the law permitted a refund of taxes wrongfully collected for a period of up to 3 years. The July 2003 amendment restricted the refund to the year immediately preceding tire year in which the application was filed; in this case, limiting the Clinic’s refund to 2001.
The Board of County Commissioners argues that when confronted with an improper tax assessment on nontaxable property, tire Clinic could have avoided its current problem by paying the taxes under protest. We fail to understand how this could have happened under the facts presented. The error in the assessment was not uncovered until 2002. The improper tax collections began in 1996. The taxes had long since been paid when the error was uncovered. Once the taxes were paid, the die was cast and the only available manner for redress was the Clinic’s refund application. K.S.A. 79-213(lc) in effect at the time clearly provided for relief in the form of a refund for taxes paid on exempt property for a period not to exceed 3 years. With the 2003 amendment of K.S.A. 79-213(k), the Clinic’s claims for the years preceding 2001 were taken from it. Thus, its right to reimbursement for taxes collected for those years was abolished with no substitute remedy provided.
Finally, we must consider the nature and strength of the public interest furthered by this amendment to the statute. As noted in Carlton:
“ ‘Provided that die retroactive application of a statute is supported by a legitimate legislative purpose furthered by rational means, judgments about the wisdom of such legislation remain within the exclusive province of the legislative and executive branches ....’” 512 U.S. at 30-31.
Carlton is instructive on the issue of the public policy considerations that may support retroactive application of a statute. Neither *121party suggests any public policy or legislative purpose that the retroactive application of the changes in K.S.A. 79-213(k) was designed to accomplish. Our own research of the legislative history discloses no stated purpose for the retroactive aspect of the amendment. While we can speculate about a possible rationale, an exercise that is wholly appropriate in considering an equal protection challenge, we engage in no such speculation in considering the Clinic’s claim of a denial of due process.
The facts in Carlton highlight the marked differences between the tax issue there and the issue now before us. The 1986 Tax Reform Act was at the focus of Carlton. In order to promote employee ownership, Congress created a new estate tax deduction for the sale of shares of stock to an employee stock ownership plan (ESOP). Congress estimated the new deduction would cause a $300 million loss in estate tax revenue over a 5-year period. Congress soon realized, however, that it had underestimated the loss in tax revenue by a magnitude of 20 times. Further, it discovered that the deduction had erroneously not been limited to stock owned by the decedent at the time of death. Consequently, it retroactively amended the law in 1987 to require that stock sold to an ESOP must have been owned by the decedent before death.
In the meantime, the executor of Carlton’s estate used estate funds to purchase over $11 million in stock of MCI Communications Corp. The executor sold the shares 2 days later for a $631,000 loss for the sole purpose of generating a deduction for the estate. The executor calculated that the tax deduction from the transaction would be worth more to the estate than the $631,000 loss on the stock sale.
The Court in Carlton concluded that Congress properly acted to correct what it reasonably viewed as a mistake in the original law that would have created a significant and unanticipated revenue loss. 512 U.S. at 35. No comparable remedial effort or concern is shown in the record or the legislative history of the amendment to K.S.A. 79-213(k). While we defer to the legislature on matters of economic and fiscal policy, there is no clear and compelling policy behind the 2003 amendment to K.S.A. 79-213(k) that warrants the extinguishment of the Clinic’s right to a refund for taxes *122assessed and collected on property not subject to taxation. As stated by our Supreme Court in Fleischer: “In the case at bar, as in Thorp, there does not appear to be a compelling public interest in retro-activity.” 257 Kan. at 374. As in Fleischer, we find no such compelling public interest here.
Further, K.S.A. 2003 Supp. 79-213(k) presents a situation different from that found in Taxpayers United v. Detroit, 196 Mich. App. 463,493 N.W.2d 463 (1992). In the Detroit case the Michigan Legislature enacted a utility users tax which expired in 1988. When the constitutionality of the tax was challenged, the court ultimately determined in 1990 that the tax was constitutional in all respects. In response to this decision, the legislature in 1990 enacted a new version of the tax and declared it to be retroactively effective from 1988 when the former tax expired. When taxpayers challenged the retroactive application of this new legislation on constitutional grounds, the Michigan Court of Appeals concluded:
“Plaintiffs cannot argue tire utility users tax was unanticipated. The tax had been collected for nearly twenty years before tire time now being contested, and was, in fact, collected throughout the pendency of this suit. Moreover, because the tax was assessed upon a relatively essential utility service, it is improbable plaintiffs would have significantly changed their usual consumption because of the tax. Plaintiffs were not assessed a retroactive fee for engaging in a voluntary act they might have foregone had they been aware of the tax. [Citation omitted.]” 196 Mich. App. at 468.
Unlike the retroactively applied utilities tax in Detroit, the 2003 amendment to K.S.A. 79-213(k) was not a retroactive “back-filling” of a gap in an otherwise uninterrupted scheme of taxation. It did not serve to maintain the status quo ante as in Detroit. To the contrary, it changed the status quo ante by limiting for the first time the tax refund period that had been a part of the statute since its inception in 1980.
Our review of cases from other jurisdictions shows a wide variety of approaches and outcomes. We find most persuasive the approach taken in Arizona. In Rio Rico Properties, Inc. v. Santa Cruz County, 172 Ariz. 80, 834 P.2d 166 (1992), the assessor s list of personal property upon which it imposed its tax was incorrect. The taxpayer brought an action to recover the wrongfully assessed and *123collected taxes pursuant to Ariz. Rev. Stat. Ann. § 11-506, which provided for refunds for erroneous assessments. The legislature then amended the statute to retroactively modify the definition of an erroneous assessment so as to now impair the taxpayer s claim. The court noted:
“ ‘[A] right vests only when it is actually assertable as a legal cause of action or defense or is so substantially relied upon that retroactive divestiture would be manifestly unjust.’ [Citation omitted]. Once the taxpayer malees his claim against tire county as provided in the statute, assuming all of the predicate facts are true, the taxpayer is entitled to a refund. The Court holds that the Taxpayers’ right to a refund pursuant to 11-506 vests when the claim against the County is made.” Rio Rico, 172 Ariz. at 90.
In dealing with an issue that is frequently raised by taxing authorities in these cases, the court in Rio Roco observed:
“The Counties and the Department have argued that a person cannot have a vested right in a tax or in the absence of a tax. Therefore, says the Government, no one can have a vested right in any benefit from [Ariz. Rev. Stat. Ann.] § 11-506. [Ariz. Rev. Stat. Ann.] § 11-506 does not define or impose a tax. It provides a right to a refund for money collected as a tax which never should have been collected at all. The Court holds that the right to such a refund may become a vested right.” Rio Rico, 172 Ariz. at 90-91.
In the present case, when the Clinic filed its claim, the predicate fact that its applications software was not subject to tax was true, and the County conceded this in its response. Further, as in Rio Rico, we are confronted with a statute that does not define or impose a tax. “It provides a right to a refund for money collected as a tax which never should have been collected at all.” 172 Ariz. at 91.
This Arizona statute was challenged again in S & R Properties v. Maricopa County, 178 Ariz. 491, 875 P.2d 150 (1993). The court held that the right to a refund created by the statute was similar to a right to collect damages and thus was substantive rather than procedural. The amendment to the statute worked a substantive change in the law which would impair vested rights if applied retroactively. In analyzing the vested rights issue, the court concluded that under the statute the mere filing of a refund application did not create a vested right since
*124“the right is contingent upon verification of an erroneous assessment by the DOR. That verification may not occur. On the other hand, if the County processes a refund claim and the DOR verifies that the tax was paid on an erroneous assessment, the taxpayers will have a vested substantive right to a refund. [Citation omitted].” 178 Ariz. at 499.
K.S.A. 2003 Supp. 79-213(k) differs in detail from the Arizona statute. Nonetheless, the principle remains the same. The Clinic sought a tax exemption for its applications software and a refund for taxes improperly assessed and collected. The County conceded at the time, and well before the amendment to K.S.A. 79-213(k), that under existing Kansas law announced in Tax Protest ofStrayer, the applications software was not subject to tax. Thus, there was no issue that at the time of the Clinic s application, and before tire statutory change, the Clinic was entitled to a refund for taxes paid on this tax-exempt property. Therefore, the Clinic’s right to a refund before the legislative change was not contingent or inchoate but fully vested at the time it filed its application and before the change to K.S.A. 79-213(k).
The State may not enact legislation which deprives a person of property without due process of law guaranteed by the United States and Kansas Constitutions. The retroactive application of the amendment to K.S.A. 79-213(k) to the Clinic’s refund claim violates this right.
Equal Protection
Finally, the Clinic argues K.S.A. 2003 Supp. 79-213(k) is unconstitutional as applied because it classifies taxpayers into two groups based entirely on the status of the taxpayers without consideration of property.
In In re Tax Appeal of Sprint Communications Co., 278 Kan. 690, 101 P.3d 1239 (2004), five telecommunication companies sought refunds for taxes paid on the purchase of telecommunication equipment. The issue was whether the equipment was to be used to manufacture tangible personal property for resale, thereby rendering it exempt from taxation, or to provide a service which is subject to tax. BOTA determined that the equipment was used to render a service and was, therefore, subject to tax. The taxpayers *125claimed that BOTA’s denial of an exemption violated the Equal Protection Clause because similarly used equipment in the hands of electric utility companies was exempt from taxation. In concluding that the taxpayers failed to meet their burden of establishing an equal protection violation, the court set forth the applicable standards enumerated in In re Tax Appeal of Alsop Sand Co., Inc., 265 Kan. 510, 522, 962 P.2d 435 (1998):
“ ‘Equal protection is implicated when a statute treats “arguably indistinguishable’ classes of people differently. . . .” Syl. ¶ 3.
“ ‘The rational basis standard (sometimes referred to as the reasonable basis test) applies to laws which result in some economic inequality. Under this standard, a law is constitutional, despite some unequal classification of citizens, if the classification bears a reasonable relationship to a valid legislative objective.’ Syl. ¶ 4.
“ ‘The reasonable basis test is violated only if the statutory classification rests on grounds wholly irrelevant to the achievement of the State’s legitimate objective. The state legislature is presumed to have acted within its constitutional power, even if the statute results in some inequality. Under the reasonable basis test, a statutory discrimination will not be set aside if any state of facts reasonably may be conceived to justify it.’ Syl. ¶ 5.
“ ‘In taxation, even more than in other fields, legislatures possess the greatest freedom in classification.’ Syl. ¶ 7.” (Emphasis added.)
The rational basis test for an equal protection challenge is a high hurdle for the Clinic to cross. The Clinic must negate all possible facts which could reasonably be conceived of to justify the retroactive application of the statute. As noted earlier, there is no legislative history which identifies a public policy rationale that supports retroactive application of the amendments to this statute in the face of a due process challenge. However, under the rational basis test we can conceive of a reasonable basis (such as limiting a County’s exposure to liability for repayment of taxes from earlier years which may have already been spent) that could justify retroactive application of the statute in the face of an equal protection challenge. Thus, the Clinic has failed in its burden to demonstrate that no state of facts could reasonably be conceived of to justify retroactive application to it of K.S.A. 79-213(k) as amended in 2003.
*126State ex rel. Stephan v. Parrish, 257 Kan. 294, 891 P.2d 445 (1995), which the Clinic relies upon, does not help its cause since it is distinguishable based upon the clear lack of any conceivable rational basis for the classification of taxpayers. There, the court was confronted with legislation which afforded tax amnesty for certain taxpayers in Leavenworth County who failed to report and pay taxes on personal property. The court concluded:
“[T]he determination of the constitutionality of §14 is one of equal protection and fundamental fairness as required by the Kansas Constitution. Section 14 is an unreasonable grant of a tax amnesty or ‘window of opportunity’ based solely on a characteristic or status of the taxpayer rather than upon appropriate classification of the property. Taxpayers are divided into two classes, those who honestly reported their property for taxation or those who, for whatever reason, did not report their property for taxation or underreported the property if returned. The latter group are granted freedom from taxation and statutory penalties, while the former group is not. Such discrimination, when judged against the taxation guidelines, is arbitrary and lacks the rational basis necessary to be constitutional.” 257 Kan. at 311.
Unlike the special tax legislation in Parrish, we can reasonably conceive of a legislative state interest that the 2003 amendment to K.S.A. 79-213(k) could be designed to achieve. Though the application of the 2003 amendment to K.S.A. 79-213(k) to the Clinic violated its right to due process, it did not violate its right to the equal protection of the law.
Reversed.