
522 S.E.2d 890 (2000)
31 Va. App. 281
Dennis G. SMITH, Director, Virginia Department of Medical Assistance Services
v.
LIBERTY NURSING HOME, INC., Beverly Enterprises, Inc. and William J. Lemon.
Record No. 2926-98-3.
Court of Appeals of Virginia, Salem.
January 11, 2000.
*892 Paige Selden Fitzgerald, Assistant Attorney General (Mark L. Earley, Attorney General; Siran S. Faulders, Senior Assistant Attorney General, on briefs), for appellant.
Robert T. Adams (Thomas J. Stallings; McGuire, Woods, Battle & Boothe, LLP, on brief), Richmond, for appellees.
Present: FITZPATRICK, C.J., and COLEMAN and BUMGARDNER, JJ.
COLEMAN, Judge.
This appeal involves a dispute between the Director of the Department of Medical Assistance Services (DMAS) and the appellees, who at various times operated Rose Hill Nursing Home in Warren County. The dispute concerns Medicaid payments that DMAS made in 1979 and 1986, respectively, to the appellees for nursing home care and related expenses which the appellees provided for Medicaid recipients at Rose Hill Nursing Home. After the payments had been made by DMAS and pursuant to Code § 32.1-325.1, the Director made "initial determinations" between October 3, 1990 and July 15, 1992, that DMAS had overpaid the appellees $968,875 for excessive depreciation and lease cost reimbursements for the Rose Hill Nursing Home. The Director claimed that the appellees were not entitled to reimbursement for the claimed depreciation on the facility by virtue of Medicaid's "relatedparty" rule and that appellees' claims for lease costs reimbursement were excessive because under DMAS's "cost of ownership" accounting principles, the appellees' lease costs should have been reduced after the appellees refinanced the mortgage loan.
The appellees disputed that DMAS was entitled to reimbursement and requested a formal administrative hearing pursuant to Code § 9-6.14:12 of the Administrative Process Act. An administrative hearing, an appeal to the circuit court, and this appeal followed.

PROCEDURAL BACKGROUND
At the formal administrative hearing, the hearing officer held: (1) that the Director, because he initiated the claims for reimbursement from the appellees, had the burden of proving that the appellees were not entitled to the Medicaid funds under the *893 applicable Medicaid regulations; (2) that the appellees' expert witnesses were more credible than DMAS's expert witness based upon the witnesses' demeanor and their respective explanations of how to apply DMAS's Medicaid regulations; (3) that the major portion of DMAS's reimbursement claims were barred by Code § 32.1-325.1:1(B), enacted in 1990, which provides that the Director's "initial determination [of overpayment] shall be made within the earlier of (i) four years, or (ii) fifteen months after filing of the final cost report by the provider subsequent to sale of the facility or termination of the provider";[1] and (4) that DMAS was not entitled to reimbursement of the claimed overpayments, based upon the hearing examiner's interpretation and application of the Medicaid regulations as explained by the appellees' expert witnesses.
The Director rejected the hearing officer's decision and recommendations and rendered a final case decision on August 8, 1997. He ruled that the hearing officer: (1) had erroneously placed the burden of proof on the Director, rather than the appellees; (2) had erroneously found the appellees' expert witnesses more credible; (3) had erroneously ruled that Code § 32.1-325.1:1(B) was a statute of limitation barring all claims that were more than four years old; and (4) had erroneously held that Code § 32.1-325.1:1(B) enacted in 1990 was to be applied retrospectively. Thus, the Director ruled that according to the Medicaid regulations as he interpreted and applied them, DMAS had overpaid the appellees by $968,875. The appellees appealed the Director's decision to the circuit court pursuant to Code § 9-6.14:15-19.
The circuit court ruled that: (1) the appellees, rather than the Director, had the burden of proof in challenging the agency's decision; (2) the Director erred in rejecting the hearing officer's factual findings that the appellees' expert witnesses were more credible based upon their demeanor and explanations as to how the regulations had previously been interpreted and applied; and (3) Code § 32.1-325.1:1(B) is a statute of repose that applies retrospectively to bar the majority of DMAS's reimbursement claims. Accordingly, the circuit court remanded for the Director to reconsider those claims not barred by Code § 32.1-325.1:1(B) and to consider them based upon the hearing examiner's credibility determinations as to the appellees' expert witnesses' evidence, but with the appellees having the burden of proof.
We review the issues on appeal from the circuit court.[2]

CODE § 32.1-325.1:1(B) STATUTORY TIME LIMITATIONS

In 1986, the legislature enacted Code § 32.1-325.1 in order to create a mechanism for DMAS to recover overpayments that had been made to Medicaid providers. That statute mandates that the Director make an initial determination of overpayment and undertake full recovery. See Code § 32.1-325.1. In 1990, the legislature revisited the statutory mechanism for recapturing overpayments and enacted Code § 32.1-325.1:1. The relevant portion of subsection B of the 1990 enactment provides: "Such initial determination [of overpayment] shall be made within the earlier of (i) four years, or (ii) fifteen months after filing of the final cost report by the provider subsequent to sale of the facility or termination of the provider." Code § 32.1-325.1:1(8).
The statute does not expressly provide a consequence for the Director's failure to determine the overpayment within the specified time. The Director contends that the language of Code § 32.1-325.1:1 is merely directory and that no adverse consequences flow from his inability, unwillingness, or delay in determining or collecting overpayments within the time periods provided by statute. The appellees argue that the statute is mandatory *894 and limits the Director from pursuing any claim for overpayment made more than four years prior to the date of the Director's initial determination that an overpayment had been made.
The issue as to whether a statute is one of repose that bars a cause of action or one of limitation that bars a remedy, or is merely directory, is a legal question of statutory construction that "`falls outside the area generally entrusted to ... [an] agency, and is one in which courts have a special competence.'" Johnston-Willis, Ltd. v. Kenley, 6 Va.App. 231, 243-44, 369 S.E.2d 1, 8 (1988) (quoting Hi-Craft Clothing Co. v. N.L.R.B., 660 F.2d 910, 914-15 (3d. Cir.1981)). Thus, whether Code § 32.1-325.1:1(B) is directory or is a statute of repose or limitation is a legal issue for the courts to decide without being required to give deference to an agency's construction of the statute. Thus, we decide whether Code § 32.1-325.1:1 is directory or mandatory and whether it is a statute limiting the agency's remedy or cause of action.
Both statutes of limitation and statutes of repose preclude litigation of stale claims. See Commonwealth v. Owens-Corning Fiberglas Corp., 238 Va. 595, 598-99, 385 S.E.2d 865, 867 (1989). However, a statute of limitation does not apply to the Commonwealth unless the statute expressly so provides. See id. at 603-04, 385 S.E.2d at 870 (Poff, S.J., dissenting); see also Code § 8.01-231. Here, the statute, whether it be one of repose or limitation, by its terms expressly applies to the Commonwealth and its agency, DMAS. Therefore, because the statute applies to the Commonwealth, it is irrelevant, for our purposes, whether the statute, if mandatory, is one of limitation or repose. Accordingly, the dispositive issues are whether the statute is mandatory or only directory, and, if mandatory, whether the statute applies retrospectively to claims existing prior to its enactment in 1990.
"`A mandatory provision in a statute is one the omission to follow which renders the proceeding to which it relates illegal and void, while a directory provision is one the observance of which is not necessary to the validity of the proceeding.'" Ladd v. Lamb, 195 Va. 1031, 1035, 81 S.E.2d 756, 759 (1954) (quoting 82 C.J.S. Statutes, § 374, at 868 (1953)).
"Generally the rule is where a statute specifies a time within which a public officer is to perform an act regarding the rights and duties of others, it will be considered as merely directory, unless the nature of the act to be performed or the language shows that the designation of time was intended as a limitation of power."
Huffman v. Kite, 198 Va. 196, 200, 93 S.E.2d 328, 331 (1956) (quoting Nelms v. Vaughan, 84 Va. 696, 699-700, 5 S.E. 704, 706 (1888)). From our reading of the statute, the legislature intended Code § 32.1-325.1:1(B) to be a "limitation of power" that restricts DMAS from seeking return of overpayments after the expiration of a certain time period. We construe the time limits in Code § 32.1-325.1:1(B) as being more than merely directory; we hold that the legislature intended to create a mandatory limitation.
In reaching that holding, we believe the statutory framework and chronology of the legislation are indicative of the General Assembly's intent. Furthermore, we assume the legislature enacted the language at issue in Code § 32.1-325.1:1(B) to achieve a purpose. See Williams v. Commonwealth, 190 Va. 280, 293, 56 S.E.2d 537, 543 (1949) ("We must assume that the legislature did not intend to do a vain and useless thing."); Barnett v. D.L. Bromwell, Inc., 6 Va.App. 30, 34, 366 S.E.2d 271, 273 (1988) (en banc). Having mandated in 1986 by enacting Code § 32.1-325.1 that the Director "shall" recover overpayments, the legislature in 1990 revisited the statutory collection scheme by enacting Code § 32.1-325.1:1(B), which provides that the Director "shall" make an initial determination within "the earlier of (i) four years, or (ii) fifteen months after the filing of the final cost report ... subsequent to sale of the facility or termination of the provider." Although the legislature could have stated the limitation more clearly or expressly, we conclude "from the nature [and purpose] of the act the designation of time must be considered a limitation on the power of the officer." Huffman, 198 Va. at 200, 93 *895 S.E.2d at 331 (quoting 50 Am.Jur. Statutes § 23, at 46 (1944)).
The General Assembly was obviously concerned that the Director not unduly delay determining and collecting overpayments made to Medicaid providers. We find that the provision in the statute which provides the Director shall act to recover funds within fifteen months after a provider has filed a final cost report subsequent to the sale of a facility or termination of the provider makes apparent the legislative intent that the time be a limitation rather than an ideal or goal for which the Director should strive. The manifest purpose for enacting this provision was to ensure that the Director "shall" not permit a claim for overpayment to languish and to prevent the Director from attempting a recovery from a Medicaid provider long after a provider may have ceased doing business with DMAS. We find it illogical to construe the language providing expressly for different time limitations in the two situations as directory. Furthermore, from the chronology of enactment of the statutes, we conclude that the legislature intended to place limits on DMAS's authority to recover overpayments. We see no reason, in this context, to give "shall" a permissive or directory meaning. See e.g., Last v. Virginia State Bd. of Medicine, 14 Va.App. 906, 912, 421 S.E.2d 201, 206 (1992) (finding that the word "shall" is generally used in the mandatory sense and that if the language of the statute is simple and unambiguous, the word will not be given a permissive interpretation). Accordingly, we hold that the provisions of Code § 32.1-325.1:1 are mandatory and limit the Director's authority to seek recovery of overpayments made to Medicaid providers.
Having determined that the time limits in Code § 32.1-325.1:1(B) are mandatory, we next determine whether the statute, passed in 1990, can retrospectively limit the Director's right to collect overpayments more than four years old. In other words, we must decide whether overpayments made in 1986 and before, which the Director had the right and obligation to collect prior to the enactment of Code § 32.1-325.1:1, are barred, or whether the statute only applies prospectively to overpayments made in 1990 and thereafter.
Although we presume statutes apply prospectively, the intent of the legislature controls the application of the statute. See Booth v. Booth, 7 Va.App. 22, 26, 371 S.E.2d 569, 571 (1988); Eaton v. Davis, 176 Va. 330, 336, 10 S.E.2d 893, 896 (1940). The legislature may enact statutes with retroactive application provided they do not conflict with constitutionally-protected rights or vested interests. See Booth, 7 Va.App. at 26, 371 S.E.2d at 571. Absent an express articulation of intent, we determine the intent from the "statutory scheme and purpose, and principles of statutory construction." Id. at 26, 371 S.E.2d at 571-72.
Here, as we have determined, the legislature enacted Code § 32.1-325.1:1(B), to limit the authority of DMAS to seek recovery of overpayments pursuant to Code § 32.1-325.1. In addition, in Code § 32.1-325.1:1(D), the legislature specifically provided that DMAS was precluded from seeking recovery of overpayments from successors in interest to health care providers, where the contracts for transfer of the health care facility were entered into before February 1, 1990. By expressly barring retroactive application of the statute to DMAS's recovery efforts against a certain class of Medicaid providers, we find that the legislature, by implication, intended other provisions of the statute to apply retroactively to DMAS's recovery efforts against other providers.
The law disfavors retroactive application of statutes, recognizing that it is unjust to interfere with rights and liabilities that are vested or have accrued before a statute's passage. See Island Creek Coal Co. v. Breeding, 6 Va.App. 1, 10, 365 S.E.2d 782, 787 (1988) (citations omitted). Where individuals lawfully contract for property rights, or are granted rights by the government, courts are loath to retroactively abridge those rights. However, by enacting Code § 32.1-325.1:1(B), the legislature determined it unjust to subject Medicaid providers to the threat of DMAS overpayment recovery, regardless of how stale the claim may be. Thus, where the statute operates retroactively to foreclose DMAS from recovery, the general presumption against retroactive application of a statute will not override the *896 legislature's decision to limit the time for which DMAS may recover overpayment. Accordingly, we hold that the statutory limitation was intended to apply retroactively and that DMAS is limited to recovering overpayments made to the appellees during the four-year period preceding the initial determinations by the Director dated July 19, 1990, June 17, 1991, and April 20, 1992, respectively.

APPLICATION OF MEDICAID REGULATIONS
We next consider the propriety of the trial court's conclusions concerning the merits of the Director's remaining claims that are not barred. In reviewing an agency's decision, this Court employs four different standards depending on the issue raised.
Where the issue is whether there is substantial evidence to support findings of fact, great deference is to be accorded the agency decision. Where the issue falls outside the specialized competence of the agency, such as constitutional and statutory interpretation issues, little deference is required to be accorded the agency decision. Where, however, the issue concerns an agency decision based on the proper application of its expert discretion, the reviewing court will not substitute its own independent judgment for that of the agency but rather will reverse the agency decision only if that decision was arbitrary and capricious. Finally, in reviewing an agency decision, the courts are required to consider the experience and specialized competence of the agency and the purposes of the basic law under which the agency acted.
Fralin v. Kozlowski, 18 Va.App. 697, 700-01, 447 S.E.2d 238, 240-41 (1994) (emphasis added) (quoting Johnston-Willis, 6 Va.App. at 246, 369 S.E.2d at 9). Thus, the degree of deference afforded an agency decision depends upon not only the nature of the issue, legal or factual, but also upon whether the issue falls within the area of experience and specialized competence of the agency.
Here, we are reviewing the interpretation and application of an agency's rules and regulations governing Medicaid principles of reimbursement. Thus, because this case involves the specialized competence of an agency in construing and applying its regulations, we are bound by the agency's decision unless the decision is arbitrary and capricious. See id. at 701, 447 S.E.2d at 240. The Director, rejecting the hearing officer's recommendations, ruled that according to Medicaid regulations, DMAS had overpaid the appellees by $968,875. At the date of its incorporation in 1977, Rose Hill Nursing Home, Incorporated, (Rose Hill) was owned by Dr. D. Blanton Allen, Frederick L. Spencer, and the three minor children of William Lemon. Also in 1977, Rose Hill entered into a management contract with Liberty Management Corporation (Liberty), which was owned solely by Lemon. Rose Hill agreed to lease the facility to Liberty in 1979 when the management agreement was voided as a result of related-party concerns expressed by DMAS. Thus, Liberty owned a leasehold interest in and operated the nursing home. The term of the lease was for seven years with an option to extend for an additional three years on the same terms and conditions that were contained in the original lease. Even though the mortgage on the property had a variable interest rate, the lease provided a $418,006 fixed annual rent for the facility.
In 1979, Allen entered into an option agreement with SWS Associates (SWS), a partnership consisting of Lemon's three minor children. The option granted SWS the exclusive right to purchase Allen's interest in the assets of Rose Hill. The option could be exercised only between November 1, 1996, and October 31, 1997. The option agreement also provided that Rose Hill would be liquidated and its assets distributed to it stockholders. In January 1980, Rose Hill was liquidated and the corporation was dissolved in June of that year by operation of law.
In December 1980, Liberty was sold to Beverly Enterprises (Beverly). Accordingly, Beverly acquired the lease of Rose Hill when it purchased Liberty and was subject to the existing lease terms. In November 1981, Lemon purchased Allen's interest in the Rose Hill property. In 1986, Lemon paid off the existing $1,800,000 loan on the facility and purportedly refinanced the debt at a lower rate of interest. He did not produce *897 documentation substantiating the refinancing. In 1992, Beverly purchased the property of Rose Hill from Lemon.

Recaptured Depreciation
The Director ruled that the appellees were not entitled to reimbursement for the claimed depreciation on the Rose Hill facility by virtue of Medicaid's "related-party" rule. The basis for DMAS's claim was that Lemon, who was one of the operating principals, was related to some of the owners of the facility, his three minor children. The period for which DMAS asserted claims for depreciation reimbursement from the appellees was 1980 and part of 1981. Because the alleged overpayments for 1980 and 1981 had been made more than four years before the Director's initial determination, DMAS is barred by our previous holding from seeking reimbursement from the appellees.

Underlying Cost of Ownership
The Director also ruled that DMAS was entitled to reimbursement of overpayments to the appellees for the costs of their lease of Rose Hill Nursing Home. The Director concluded that the interest expense is limited to the actual expense incurred by the owner of the facility in servicing the longterm debt. Consequently, after Lemon paid the loan on the facility in 1986, DMAS was entitled to adjust the cost of ownership expense by removing the interest expense component in the absence of supporting documentation that Rose Hill refinanced the debt.
The Director is "authorized to administer [the] state plan and to ... expend federal funds therefor in accordance with applicable federal and state laws and regulations...." Code § 32.1-325(B). Under the Nursing Home Payment System (NHPS), DMAS may only reimburse providers for "those allowable, reasonable cost items which are acceptable under Medicare principles of reimbursement, except as modified herein...." See NHPS, Introduction (1982). Therefore, when "DMAS considers the reimbursement of an expense claimed by a provider in a cost report, it must first apply DMAS regulations that pertain to the particular expense." Beverly Health & Rehabilitation Servs. Inc. v. Metcalf 24 Va.App. 584, 594, 484 S.E.2d 156, 161 (1997).
The applicable regulation provides that "the DMAS allowable cost of ownership shall be determined by the historical cost of the facility to the owner of record at the date the lease becomes effective." 12 V.A.C. § 30-90-280.C (1990) (emphasis added). The regulation was promulgated in 1990 to clarify the agency's existing policies concerning reimbursement of the underlying costs of ownership. Under § C.8 of the 1979 NHPS, the "rent or lease expenses are limited to the underlying historical depreciation, interest, and property tax cost" as was determined "at the date the lease becomes effective."
We find that the Director's denial of interest costs for the lease after Lemon refinanced the debt in 1986 was not in accordance with the provision of 12 V.A.C. § 30-90-280.C, providing that the "allowable cost of ownership shall be determined by the historical cost ... at the date the lease becomes effective." Therefore, the Director's failure to base the cost of ownership on the historical cost "at the date the lease [became] effective" was an arbitrary and capricious interpretation and application of the regulation. The clear language of the regulation provides that the lease cost is determined at the time the lease becomes effective. Even though Lemon refinanced the loan in 1986, Beverly was still obligated under the terms of the original lease to pay the fixed amount of the lease as previously agreed. Accordingly, because the Director disregarded the plain language of the regulation, he arbitrarily and capriciously interpreted the regulation when he concluded that DMAS was entitled to the reimbursement for the excess interest expense. See Fralin, 18 Va.App. at 701, 447 S.E.2d at 240. We find that DMAS is not entitled to reimbursement from appellees for the interest expense in the cost of the lease.

CONCLUSION
In summary, we find that the time limits in Code § 32.1-325.1:1(B) are mandatory and apply retroactively to limit the Director's right to collect overpayments more than four years old. Therefore, DMAS's claims for reimbursement of recaptured depreciation for the lease during 1980 and 1981 are barred. Finally, we hold that the Director *898 arbitrarily and capriciously applied 12 V.A.C. § 30-90-280.C to conclude that DMAS was entitled to reimbursement of the interest expense after Lemon refinanced the debt in 1986, and that under the regulation, the appellees were entitled to be reimbursed for the historical cost of the lease. Accordingly, for the reasons stated, we affirm the trial court's ruling that the Director is barred from pursuing the claims for reimbursement for depreciation, and we reverse the trial court's remand of the lease costs claims and direct the trial court to enter final judgment for the appellees based on the provisions of 12 V.A.C. § 30-92-280.C (1990). We remand the matter to the trial court for entry of final judgment in accordance with the foregoing opinion.
Affirmed in part, reversed in part, and remanded with directions.
NOTES
[1]  The Director's initial determinations of claimed overpayments were $111,713 for depreciation in 1980 and part of 1981 and $857,162 for interest costs during 1983 through 1990 as a result of refinancing.
[2]  Because we decide this case based upon the applicability of Code § 32.1-325.1:1(B) and the Director's application of the Medicaid regulations, we need not and do not reach the issues of which party had the burden of proof in challenging the agency's decision or the extent to which the hearing officer's factual findings were based on credibility and binding on the Director.
