[¶ 1.] Burlington Northern Railroad Company (Burlington) instituted a refund action in circuit court to recover improperly collected taxes in Fall River County for the tax year 1993 (# 21604) (# 21605), and 1994 (#21606). Franklin Manke, County Commissioner and a taxpayer in Fall River County, intervened and challenged the refund action. The circuit court granted summary judgment to Burlington. We affirm.
FACTS
[¶ 2.] The facts of this case will be only briefly discussed as they have been before this Court numerous times.1 Fall River County collected taxes in excess of that legally due and owing due to a method which this Court determined to be contrary to SDCL 10-28-16. Edgemont Sch. Dist. 23-1 v. Dept. of Rev., 1999 SD 48, ¶ 10, 593 N.W.2d 36, 39. The defendant paid these taxes to Fall River County under protest. After legal challenges to the valuation and assessment process were concluded, Burlington brought this refund action under SDCL chapter 10-27.
[¶ 3.] Manke is a County Commissioner and taxpayer in Fall River County. The trial court granted leave for Manke to intervene based on his status as a taxpayer *829in Fall River County. Manke claims that Burlington’s refund action is unconstitutional, barred by the doctrine of res judica-ta, collateral estoppel or law of the case, and jurisdiction in circuit court is not proper. Fall River County, through its Treasurer Shirley Green, joins in those claims. All of these appeals and their corresponding notices of review were eventually consolidated for appellate review.
[¶4.] The circuit court granted summary judgment to Burlington and awarded damages and prejudgment interest.2 Manke and Fall River County (Manke) appeal contending: 1.) the trial court lacked jurisdiction to order a refund; 2.) this action was barred as collaterally es-topped, res judicata or under the law of the case doctrine; 3.) SDCL 10-28-16 is unconstitutional; and 4.) the circuit court erred in granting summary judgment on damages without assessing Burlington’s full and true value of the property in Fall River County.
[¶ 5.] Burlington raises two issues by notice of review7: 1.) whether the circuit court abused its discretion by granting Manke’s motion to intervene; and 2.) whether the circuit court erred in denying Burlington’s motion to serve and file a supplemental complaint.
STANDARD OF REVIEW
[¶ 6.] Our standard of review for summary judgment is well established and briefly is “whether a genuine issue of material fact exists and whether the law was correctly applied.” Manuel v. Wilka, 2000 SD 61, ¶ 17, 610 N.W.2d 458, 462. A motion to amend is addressed to the sound discretion of the trial court and will not be disturbed on appeal absent a clear abuse of discretion which results in prejudice to the moving party. Tesch v. Tesch, 399 N.W.2d 880, 882 (S.D.1987). A decision to grant a motion to intervene as a matter of right is also governed by the abuse of discretion standard. Weimer v. Ypparila, 504 N.W.2d 333, 334 (S.D.1993). “Our review of a challenge to the constitutionality of a statute is de novo.” Green v. Siegel, Barnett & Schütz, 1996 SD 146, ¶ 7, 557 N.W.2d 396, 398 (citing Kyllo v. Panzer, 535 N.W.2d 896, 897 (S.D.1995)).
[¶ 7 ] 1. WHETHER THE CIRCUIT COURT LACKS JURISDICTION TO ORDER A REFUND.
[¶ 8.] Manke claims that the circuit court lacks jurisdiction to entertain the refund action brought by Burlington based on our prior decisions. We disagree.
[¶ 9.] In Fall River County v. SD Dept. of Rev., 1996 SD 106, ¶ 44, 552 N.W.2d 620, 631, we determined that “the trial court lacked jurisdiction to entertain the distribution issue.” However, in so holding our analysis was limited to the circuit court’s jurisdiction as an appellate court. Id. The circuit court lacked jurisdiction in that case because the issue raised was not properly noticed for review from the departmental decision. Id. Therefore, that is distinguishable here.
[¶ 10.] A circuit court sitting in an appellate capacity is fundamentally different than the jurisdiction a circuit court employs when it sits as a court of original jurisdiction. Burlington instituted this refund action in accord with SDCL chapter 10-27. The provisions of this chapter entitle Burlington to “commence an action against such treasurer for recovery of the tax in any court of competent jurisdiction.” SDCL 10-27-2. The provisions of chapter 10-27 are designed to provide a plain, speedy, adequate remedy at law. See Holdcroft v. Murphy, 66 S.D. 388, 283 N.W. 860, 862 (1939). As such, the jurisdiction of the circuit court was proper.
[¶ 11.] The second part of Manke’s jurisdictional argument claims that this tax was improperly before the *830circuit court as Burlington failed to exhaust its administrative remedies. This Court has held that “before a property-taxpayer may apply for judicial relief from an alleged error in valuation, he must exhaust his remedies before the board of equalization empowered to correct the error.” Chicago, Milwaukee, St. Paul & Pacific Railroad Co. v. Bd. of Com’rs, 248 N.W.2d 386, 389 (S.D.1976). “It is well settled law in South Dakota that a party who fails to complain to his county board of equalization as to excessive valuation may not question the validity of the valuation assessment to his property via SDCL 10-27-2.” Wharf Resources Inc. v. Farrier, 1996 SD 110, ¶ 12, 552 N.W.2d 610, 613. (emphasis in original). However, we have recognized that when a challenge is not merely to valuation but to whether the tax levied was in violation of South Dakota law, exhaustion is not required. Id. ¶ 13.
[¶ 12.] Burlington successfully challenged the legality of the assessment of its property in Fall River County. In Wharf Resources Inc., we held the exhaustion requirement need not be met when “Wharf challenged the legality of the tax levied, not the assessed value of its property.” Id. (emphasis in original). This rationale is equally applicable here. “[WJhere a party alleges the assessment was illegal and void, and not a mere error in valuation, he is not required to challenge that assessment with the county board of equalization, but may apply directly for judicial relief.” Id. ¶ 12.
[¶ 13.] 2. WHETHER THE DOCTRINE OF RES JUDICATA, COLLATERAL ESTOPPEL, OR LAW OF THE CASE BAR THIS ACTION.
[¶ 14.] Manke asserts that the pri- or decisions of this Court bar this refund action by Burlington. In support of this position, Manke once again maintains that we have previously held that the circuit court has no jurisdiction to entertain this refund action. Additionally, it is Manke’s contention that all- issues relating to the tax refund have been previously adjudicated. This argument is without merit.
[¶ 15.] These doctrines only apply if there was a final judgment on the merits of the issues to be precluded. Poindexter v. Hand County Bd. of Equal., 1997 SD 71, ¶ 15, 565 N.W.2d 86, 90. A prior dismissal for lack of jurisdiction does not operate to invoke the doctrines of res judicata or collateral estoppel as an adjudication on the merits. Springer v. Black, 520 N.W.2d 77, 80 (S.D.1994).3
[¶ 16.] Moreover, it is particularly important to this determination that the cause of action previously before this Court did not seek to redress this same wrong. Nelson v. Hawkeye Sec. Ins. Co., 369 N.W.2d 379, 381 (S.D.1985). Burlington’s prior litigation involved the determination of the appropriate valuation, assessment and distribution of the taxes due and owing. See Fall River County, 1996 SD 106, 552 N.W.2d 620; Edgemont Sch. Dist., 1999 SD 48, ¶4, 593 N.W.2d 36, 38. Therefore, an action to obtain a refund from taxes paid under protest after the legal challenges concluded is not barred by the doctrines of res judicata or collateral estoppel. The law of the case doctrine is inapplicable on these facts and the prior decisions relating to these taxes do not have a preclusive effect in this refund action.4
[¶ 17.] 3. WHETHER SDCL 10-28-16 IS UNCONSTITUTIONAL.
*831[¶ 18.] Manke challenges the constitutionality of SDCL 10-28-16 asserting that it violates the provisions of the South Dakota Constitution requiring uniformity and equalization of taxes. S.D. Const. Art. XI, § 2, Art. VIII, § 15. Challenges to the constitutionality of a statute are not lightly met:
There is a strong presumption that the laws enacted by the [Legislature are constitutional and that presumption is rebutted only when it clearly, palpably and plainly appears that the statute violates a provision of the constitution.” Further, the party challenging the constitutionality of a statute bears the burden of proving beyond a reasonable doubt that the statute violates a state or federal constitutional provision.
Sedlacek v. South Dakota Teener Baseball Program, 437 N.W.2d 866, 868 (S.D.1989) (quoting Oien v. City of Sioux Falls, 393 N.W.2d 286, 289 (S.D.1986) (other citations omitted)).
[¶ 19.] During all relevant times to this litigation SDCL 10-28-16 required a tax distribution on a pro rata per mile basis within the county for railroad operating property. In Edgemont Sch. Dist., 1999 SD 48, ¶ 7, 593 N.W.2d 36, 38, we upheld this requirement.5 Our Constitution requires that “taxes shall be uniform on all property of the same class.” S.D. Const. Art. XI, § 2, Art. VIII, § 15. The constitutional demand for uniformity applies within a class, and not between classes of property. In re Refusal of State Bd. of Equal., 330 N.W.2d 754, 758 (S.D. 1983). SDCL chapter 10-28 evidences a legislative intent to classify railroad operating property as a separate class. Manke complains that “Burlington receives better tax treatment than any other taxpayer in the county.” The legislature has properly created a centrally assessed classification for railroad operating property for taxation purposes. There are numerous ways the legislature could have distributed Burlington’s value. Manke’s complaints are better directed to the legislature.6 Manke is not a centrally assessed taxpayer. As such, his claim that as a taxpayer in Fall River County he suffers from unequal treatment is without merit. As mentioned, the constitutional demand for uniformity applies within a class, not between divergent classes. In re Refusal of State Bd. of Equal., 330 N.W.2d at 758.7
[¶120.] 4. WHETHER THE CIRCUIT COURT ERRED IN GRANTING SUMMARY JUDGMENT ON DAMAGES WITHOUT ASSESSING THE FULL AND TRUE VALUE OF BURLINGTON’S PROPERTY IN FALL RIVER COUNTY.
[¶121.] Manke argues that the circuit court, before awarding damages, must assess “anew” the value of the taxpayers property. Manke asks the circuit court to determine the appropriate value and assessment of Burlington’s property in Fall River County. However, as indicated earlier this valuation and assessment process has been fully litigated. What is at *832issue here, as Manke recognizes, is a “purely mathematical equation” to determine the proper amount for refund of excess taxes paid by Burlington. Manke sought to re-litigate our earlier determinations that the railroad was properly assessed on a pro rata per- mile basis. The circuit court correctly abstained and we affirm.
[¶ 22.] By notice of review, Burlington raises two issues:
[¶ 23.] 5. WHETHER THE CIRCUIT COURT ABUSED ITS DISCRETION BY GRANTING MANKE’S MOTION TO INTERVENE.
[¶ 24.] The circuit court granted Manke’s motion to intervene based on his status as a taxpayer in Fall River County. In Edgemont Sch. Dist., 1999 SD ¶¶ 13-15, 593 N.W.2d at 40, we held that Fall River County lacked the requisite standing to challenge the constitutionality of SDCL 10-28-16. In so holding, we stated in dicta that “the taxpayers within the district and county are the real parties in interest and can satisfy the traditional standing requirements.” Id. ¶ 16. Additionally, “[t]he real party in interest requirement for standing is satisfied if the litigant can show ‘that he personally has suffered some actual or threatened injury as a result of the putatively illegal conduct of the Defendant.’ ” Id.
[¶ 25.] Manke, as a Fall River County taxpayer, had a sufficient interest in this refund action. As such, it was not an abuse of discretion to allow Manke to intervene.
[¶ 26.] 6. WHETHER THE CIRCUIT COURT ERRED IN DENYING BURLINGTON’S MOTION TO SERVE AND FILE A SUPPLEMENTAL COMPLAINT.
[¶ 27.] Burlington sought leave to file a supplemental complaint to assert a refund claim for the first half of its 1994 taxes payable in 1995. The circuit court initially granted the motion and then later denied the motion in its decision granting summary judgment. While the circuit court should have clearly stated its reasons on the record for reversal of its own decision, it did not abuse its discretion in denying Burlington’s motion. See Wolff v. Secretary, SD Game, Fish & Parks Dep’t, 1996 SD 23, ¶ 50, 544 N.W.2d 531, 540 (where a judgment is correct, this court will not reverse although it was based on incorrect reasons or erroneous conclusions). The same is true for a correct result with unexplained reasons.
[¶ 28.] Burlington paid the first half of its 1994 taxes under protest. SDCL 10-27-2 requires Burlington to commence an action within thirty days after the payment of the tax under protest to seek recovery. Burlington failed to bring an action within the thirty-day period. Burlington attempted to bootstrap this prior claim nearly three years later into a refund action under SDCL chapter 10-27. For the inclusion of this additional claim the requirements of SDCL 10-27-2 must be met. Burlington’s position is that its prior claims of error appraised the county of their desire to seek a refund. This does not satisfy the requirement of SDCL 10-27-2 to commence an action within thirty days.
[¶ 29.] This Court noted in Pierre and Ft. Pierre Bridge & Railway Co. v. Stuart, 40 S.D. 473, 168 N.W. 33, 35 (1918), that actions for recovery of taxes paid under protest must be commenced within thirty days from the date of payment. The purpose of SDCL 10-27-2 is “to permit taxing districts which have made levies for their needs to receive the contemplated revenue whereby they will not be crippled in operation, and disputes with reference to the legality thereof are to be deferred for subsequent decision with the opportunity to make adequate provisions for referral if adjudged.” Chicago, Milwaukee, St. Paul & Pacific Railroad Co., 248 N.W.2d at 389-90. As Burlington failed to fulfill the mandates of SDCL 10-27-2, leave to amend was imma*833terial or properly denied on the procedural merits and the circuit court did not abuse its discretion.
[¶ 30.] Therefore, we affirm the circuit court in all respects in all cases.
[¶ 31.] MILLER, Chief Justice, and-KONENKAMP and GILBERTSON, Justices, concur. [¶ 32.] AMUNDSON, Justice, concurs in part and dissents in part.. See Fall River County v. SD Dept. of Rev., 1996 SD 106, 552 N.W.2d 620; Edgemont Sch. Dist. 23-1 v. Dept. of Rev., 1999 SD 48, ¶ 7, 593 N.W.2d 36, 38; Burlington Northern v. Green, 624 N.W.2d 358 (Table) (2001).
. Appeal #21604 awarded Burlington $37,784.39 for overpaid taxes in 1993. Appeal #21605 awarded Burlington $388,566.21 for the second half of the 1993 tax. Appeal #21606 awarded Burlington $413,203.02 for the second half of the 1994 tax.
. Our previous decision in Fall River County, 1996 SD 106, 552 N.W.2d 620, was not a prior adjudication on the merits and does not have a preclusive effect on the issue of a tax refund. The refund action was held in abeyance during the challenge to the proper method of taxation.
. "[A] question decided on a former appeal became the law of the case, not to be questioned in a second or any subsequent appeal involving any branch of the case.” Western States Land v. Lexington Ins. Co., 459 N.W.2d 429, 435 (S.D.1990).
. We refused to address the constitutionality of SDCL 10-28-16 as Fall River County lacked standing to challenge the constitutionality of its provisions. Edgemont Sch. Dist., 1999 SD 48, ¶ 12, 593 N.W.2d at 39. The issue of constitutionality is properly before this Court as Manke properly noticed the Attorney General of his challenge. See In re Estate of Holan, 2001 SD 6, 621 N.W.2d 588.
. SDCL 10-28-16 has subsequently been changed to provide a track density calculation in assessing taxation.
. Additionally, Manke asserts that the constitutional provision requiring equalization and uniformity of taxes is violated because as a result of the erroneous assessment in Fall River County “no mechanism exists to adjust the value in any other county, or see that Burlington ultimately pays the taxes due to the various counties.” However, this is not the result of the statute Manke asserts to be unconstitutional, but is the result of an errant assessment and distribution based on an interpretation of SDCL 10-28-16 we deemed erroneous. Any remedies these other counties may have is not properly before this Court.