The Department of Retirement Systems (DRS) appeals the superior court’s reversal of the DRS Presiding Officer’s decision holding that: (1) Eugene Hertzke had not retired effective September 1, 1993, because he had a prohibited written agreement to return to public service employment; and (2) his salary increase could not be included in his “earnable compensation” because it was given in lieu of life insurance payments and not in return for personal services. We reverse the superior court and affirm the Presiding Officer.
Hertzke established membership in the Teachers’ Retirement System Plan 1 on July 1, 1967. He was the superintendent for the Central Kitsap School District (the District) from July 1978 until August 31,1993. Hertzke renegotiated his employment contract in 1992. A contract addendum, signed on June 26, 1992, extended his contract until June 30, 1995, and increased his salary by $4,500, equivalent to the amount of life insurance premiums that the District had previously paid but was no longer paying. This $4,500 payment had been a portion of his salary until the District deducted that amount to pay for a life insurance policy. The District did not report this payment as Hertzke’s income for federal tax purposes. But when the insurance contract had been fully paid, the District restored the $4,500 to Hertzke’s salary. Thereafter, the District included this increase in Hertzke’s W-2 Statement and reported it to the IRS as salary. A memorandum from the District’s business manager directed the District to increase Hertzke’s 1992 to 1993 base salary to incorporate two “in lieu payments per contract”: a $7,200 payment for “automobile” and a $4,500 *925payment for “insurance.” Admin. R. at 336. Any increase in Hertzke’s salary would increase his annual pension. The District increased his base salary of $102,138 to incorporate the two “in lieu” payments, raising his salary to $113,838.
In January 1993, Hertzke met with the District Board to discuss his decision to retire on August 31, 1993. Hertzke had accumulated 106.5 days of unused vacation leave worth $55,108.43. The District wanted to limit the vacation leave cash out to only 30 accumulated vacation days. The District wanted to avoid anticipated adverse publicity. Following this meeting, the District issued a written memorandum stating that the District would agree to employ Hertzke for 30 days per year for three years and pay health benefits during those years in return for Hertzke not cashing out more than 30 days of his vacation leave. On July 16, 1993, Hertzke applied for retirement effective August 31, 1993. Hertzke’s last day of employment as superintendent was August 31, 1993. Hertzke cashed out only 30 of his 106.5 accumulated vacation days, and he received a lump sum payment of $15,523.50 from the District for these 30 vacation days. By electing to cash out only 30 days of vacation leave, he gave up $39,584.93 in vacation leave cash out payments.
Hertzke received a copy of an internal District memorandum dated August 30, 1993, which stated: “Per the agreement with the Board of Directors, [the District] will pay the premiums on Dr. Hertzke’s benefits from October 1, 1993 through August 31, 1996.” Admin. R. at 161, 338. Hertzke began receiving health benefits from the District on October 1, 1993. Another internal memorandum dated November 15, 1993 discussed the agreement.
On November 29, 1993, Hertzke signed a contract with the District to serve as a special assistant to the superintendent, in which he agreed to work for the District up to 30 days during the 1993-94 school year with possible extensions.
In April and May 1994, DRS conducted an audit of the District. The DRS audit determined that Hertzke had not *926legally retired on August 31,1993, because he had a written agreement to return to public school employment before he terminated as superintendent. The DRS audit concluded that Hertzke had received an overpayment of pension benefits and that Hertzke had incorrectly calculated his earnable compensation. DRS calculated Hertzke’s overpayment to be $29,497.68. On August 30, 1994, after Hertzke was notified of the DRS audit findings, Hertzke separated from District employment as special assistant to the superintendent.
Hertzke appealed, and on December 16, 1994, a retirement petition examiner sustained the determination of the DRS auditor. Hertzke appealed that decision. By written decision on June 4, 1998, the DRS Presiding Officer upheld the retirement petition examiner’s decision. Hertzke appealed again. The superior court reversed the agency decision, holding that Hertzke entered retirement status on August 31, 1993, and that the $4,500 payment was “earn-able compensation.”
I. Qualifications of Retirement
A. Standard of Review
On review of an agency decision, this court sits in the same position as the superior court and applies the standards of the Administrative Procedure Act (APA) to the record before the agency. Tapper v. Employment Sec. Dep’t, 122 Wn.2d 397, 402, 858 P.2d 494 (1993). Under the APA, a reviewing court may reverse an agency’s decision when: “(i) the agency erroneously interpreted or applied the law; (ii) the agency’s decision is not supported by substantial evidence; or (iii) the agency’s ruling is arbitrary or capricious.” Aponte v. Dep’t of Soc. & Health Servs., 92 Wn. App. 604, 615, 965 P.2d 626 (1998) (footnote omitted) (citing Tapper, 122 Wn.2d at 402, and RCW 34.05.570(3)), review denied, 137 Wn.2d 1028 (1999). The party challenging an agency’s action bears the burden of demonstrating the invalidity of the decision. RCW 34.05.570. This court reviews factual *927findings under the substantial evidence standard and conclusions of law de novo. We give substantial weight to the agency’s interpretation of the law when the subject area falls within the agency’s area of expertise. Wilson v. Employment Sec. Dep’t, 87 Wn. App. 197, 201-02, 940 P.2d 269 (1997); see also RCW 34.05.570(3); Towle v. Dep’t of Fish & Wildlife, 94 Wn. App. 196, 971 P.2d 591 (1999). Hertzke has not challenged the findings of fact; thus, the unchallenged findings become verities on appeal. Davis v. Dep’t of Labor & Indus., 94 Wn.2d 119, 123, 615 P.2d 1279 (1980).
B. Validity of WAC 415-112-515
DRS administers the Teachers’ Retirement System (TRS). TRS membership is governed by chapter 41.32 RCW. The benefits and funding provisions of TRS Plan 1 cover persons who became TRS members prior to October 1, 1977.1 RCW 41.32.010(38). Hertzke was a TRS Plan 1 member.
Hertzke challenges the validity of WAC 415-112-515, a DRS regulation that denies retirement to a TRS Plan 1 member who has a written agreement to return to public school employment. RCW 34.05.570(2)(a) governs judicial review of an agency rule, and it permits review in the context of any review proceeding under RCW 34.05.570, so long as the rule-making agency is a party. Boise Cascade Corp. v. Wash. Toxics Coalition, 68 Wn. App. 447, 451, 843 P.2d 1092, review denied, 121 Wn.2d 1017 (1993). Hertzke argues that the rule is outside DRS’s authority, alleging three grounds: (1) the provisions were not authorized by former RCW 41.32.480 (1991); (2) the rule was inconsistent with former RCW 41.32.570 (1989); and (3) the legislature repealed the rule through its 1997 amendments of RCW 41.32.570.
1. Waiver
DRS contends that Hertzke did not raise the validity of WAC 415-112-515 before the agency and that he cannot raise this issue for the first time in superior court. *928This contention has merit. Issues not raised before the agency may not generally be raised on appeal. RCW 34.05.554; King County v. State Boundary Review Bd., 122 Wn.2d 648, 668, 860 P.2d 1024 (1993). The court, however, has inherent authority to consider all issues necessary to reach a proper decision. Shoreline Cmty. Coll. Dist. No. 7 v. Employment Sec. Dep’t, 120 Wn.2d 394, 402, 842 P.2d 938 (1992); Heidgerken v. Dep’t of Natural Res., 99 Wn. App. 380, 387, 993 P.2d 934, review denied, 141 Wn.2d 1015 (2000). Further, Hertzke contends that DRS acted outside its statutory authority. “[Wlhen an agency acts outside its statutory powers, it is acting without jurisdiction over the subject matter, and subject matter jurisdiction may be raised at any time.” Boise Cascade, 68 Wn. App. at 452. We choose to address the issue.
2. Scope of the Department’s Statutory Authority
Hertzke maintains that DRS acted outside its statutory authority in adopting WAC 415-112-515. WAC 415-112--515 interprets “retirement” as provided in former RCW 41.32.480. Hertzke argues that the rule is in conflict with a statute. Former RCW 41.32.480(1) (1991) states in part:
Any member who has left public school employment after having completed thirty years of creditable service may retire upon the approval by the department of an application for retirement filed on the prescribed form. Upon retirement the member shall receive a retirement allowance!.]
Former RCW 41.32.480(2) (1991) states in part:
Any member who has attained age sixty years, but who has completed less than thirty years of creditable service, upon leaving public school service, may retire upon the approval by the department of an application for retirement filed on the prescribed form. Upon retirement the member shall receive a retirement allowance!.]
WAC 415-112-515 sets out requirements for determining when an individual separates from service and enters retirement status under RCW 41.32.480. Former WAC *929415-112-515 (1991)2 provided:
A member of the teacher’s retirement system Plan 1 enters retirement status when he or she:
(1) Has terminated all public school employment in the state of Washington;
(2) Has no written agreement to return to public school employment; and
(3) Has received his or her first monthly retirement payment.
Subsection (2) of WAC 415-112-515 is consistent with former RCW 41.32.480. Hertzke could not have left public school employment because he had a written agreement for a prearranged return to public school employment. The administrative rule is a reasonable interpretation of the statue, and it is within the DRS’s statutory authority to promulgate. RCW 41.50.050(5).3
3. Consistency with Former RCW 41.32.570
Former RCW 41.32.570 (1989), as it existed in 1993, provided as follows:
(1) Any retired teacher who enters service in any public educational institution in Washington state shall cease to receive pension payments while engaged in such service: PROVIDED, That service may be rendered up to seventy-five days per school year without reduction of pension.
Hertzke argues that the rule is inconsistent with this statute. But the statute and the rule deal with different subject matters. WAC 415-112-515 addresses how retirement status is determined. The statute, on the other hand, applies to retirees. It provides them with the opportunity to have postretirement employment without a reduction in their pension. It addresses the rights of persons already in “retirement” status. Thus, the rule is not inconsistent with the statute.
*9304. Retroactivity
Hertzke contends the 1997 amendments to the TRS statutes are retroactive and effectively repealed WAC 415--112-515. DRS asserts that only the TRS statutes in effect in 1993, when Hertzke filed for retirement, should apply to this case. Thus, DRS asserts that even if WAC 415-112-515 is invalid under the 1997 amendments to the TRS statutes, the regulation was valid under the statutes in 1993.
A statutory amendment is like any other statute and is presumed to apply prospectively only. In re F.D. Processing, Inc., 119 Wn.2d 452, 460, 832 P.2d 1303 (1992). But an amendment may be retroactively applied if the legislature intended retroactive application, if the amendment is “clearly curative,” or if the amendment is “remedial.” F.D. Processing, 119 Wn.2d at 460. Notably, because a state’s obligation to pay a pension is contractual in nature and pension benefits are determined from the date of employment, courts generally look to the statutes and contracts in effect at time of employment. See e.g., Crabtree v. Dep’t of Ret. Sys., 101 Wn.2d 552, 556-57, 681 P.2d 245 (1984); Wash. Fed’n of State Employees, Council 28 v. State, 101 Wn.2d 536, 541, 682 P.2d 869 (1984) (citing Bakenhus v. City of Seattle, 48 Wn.2d 695, 296 P.2d 536 (1956)). In construing revised statutes, the court takes great caution to avoid giving an effect that the legislature did not contemplate. Knack v. Dep’t of Ret. Sys., 54 Wn. App. 654, 661, 776 P.2d 687 (citing Amburn v. Daly, 81 Wn.2d 241, 245, 501 P.2d 178 (1972)), review denied, 113 Wn.2d 1021 (1989).
Here, the legislature explicitly provided that only certain sections of the 1997 amendments would be retroactive. The legislature stated:
This act applies to all overpayments discovered by the [DRS] on or after June 1,1996, except that sections 10,12,14,15, and 16 of this act apply retroactively to any person who retired under *931chapter 234, Laws of 1992 or part III of chapter 519, Laws of 1993.
Laws of 1997, ch. 254, § 17.4 These retroactive sections do not apply to TRS statutes or TRS members. The noted retroactive sections deal with the Washington Public Employees’ Retirement System, chapter 42.41 RCW, and not the TRS, chapter 42.32 RCW. Laws of 1997, ch. 254, § 17. Thus, as the legislature expressly stated, the 1997 amendments apply to “overpayments discovered by the [DRS] on or after June 1, 1996[.]” Laws of 1997, ch. 254, § 17. DRS discovered the overpayment to Hertzke in the 1994 audit. Consequently, because DRS discovered the overpayment to Hertzke before June 1,1996, the 1997 amendments are not retroactive in this case and do not apply.
Even assuming, without so holding, that the 1997 amendments did apply, the same analysis regarding the former RCW 41.32.570 applies here. The current version of RCW 41.32.570 and the regulation still address different topics. The 1997 amendments did not repeal WAC 415-112-515(2), the subsection on written agreements. The 1997 amendments added a required 30-day break in service before a retiree could return to limited service and continue to receive a full retirement allowance. RCW 41.32.570(1). Both before and after the 1997 amendments, RCW 41-.32.570 dealt exclusively with the rights of retirees to return to work. It did not address the rights of persons who had not yet reached retirement status, nor did it define retirement status.
We note that when the legislature amended various TRS statutes in 1994, it intended to encourage retired teachers to serve as substitute teachers by increasing the number of days they can work without affecting their retirement payments. Laws of 1994, ch. 69, § 1. As Hertzke points out, *932WAC 415-112-515(2) would prevent teachers from retiring if they have written agreements to return to work as substitute teachers. Thus, although the legislature is encouraging substitute teaching in retirement, this rule provides a disincentive for teachers to enter into preretirement discussions regarding postretirement work. But Hertzke was not returning as a substitute teacher but rather as a special assistant to the superintendent. In any event, if it is necessary to develop procedures to permit TRS members to enter into preretirement written agreements for substitute teaching during retirement, that is properly a legislative, rather than a judicial, function. See Clark v. Payne, 61 Wn. App. 189, 195, 810 P.2d 931, review denied, 117 Wn.2d 1022 (1991).
The statute and the regulation are consistent. Thus, the superior court erred in invalidating WAC 415-112-515.
C. “Written Agreement” under WAC 415-112-515
DRS contends that its Presiding Officer properly found that there was a written agreement in violation of WAC 415-112-515. DRS contends that a “written agreement” is something less than a contract and that the documents the District wrote, combined with Hertzke’s actions exhibiting acceptance, are sufficient to show a written agreement. Hertzke argues that because he did not write or sign a binding contract, he did not enter into any written agreement while he was still employed as superintendent. We review the DRS Presiding Officer’s legal conclusions de novo. Towle, 94 Wn. App. at 204.
WAC 415-112-515(2) requires that to enter retirement status the member have “no written agreement to return to public school employment[.]” The term “written agreement” is not defined in the regulations or statutes. We give undefined regulatory terms, like undefined statutory terms, their usual and ordinary meaning. See Nationwide Ins. v. Williams, 71 Wn. App. 336, 342, 858 P.2d 516 (1993), review denied, 123 Wn.2d 1022 (1994).
DRS argues that the term “written agreement” includes *933writings by one party describing an agreement combined with the other party’s actions exhibiting assent to the agreement. A binding contract can exist where one party creates a written document affirmed by the other party’s assent through actions. Kloss v. Honeywell, Inc., 77 Wn. App. 294, 298-300, 890 P.2d 480 (1995). We find this instructive. The DRS’s construction of “written agreement” is reasonable.
Further, substantial evidence supports the DRS Presiding Officer. Here, the DRS Presiding Officer found evidence to support a written agreement based on: (1) the District’s written offer from January 27, 1993 and other internal District memoranda from August 30, 1993 and November 15, 1993; (2) Hertzke’s actions on the day before he retired of cashing out only 30 of his 106 accumulated vacation days, as mentioned in the written offer; and (3) Hertzke’s acceptance of medical benefits on October 1, 1993. In July, Hertzke applied for retirement upon the terms set forth in the offer. His later actions affirmed his acceptance; thus, he demonstrated his assent. The later signed contract is entirely consistent with the January 1993 memorandum. The offer and acceptance clearly demonstrate mutual assent to the written agreement.
II. Earnable Compensation
ATRS Plan 1 member’s retirement allowance is based on the individual’s “earnable compensation” during the member’s two highest compensated consecutive years of membership service. RCW 41.32.497(3), .498. For TRS Plan 1 members, “earnable compensation” means “[a]ll salaries and wages paid by an employer to an employee member of the retirement system for personal services rendered during a fiscal year.” RCW 41.32.010(10)(a). Payments that are not in exchange for personal services are not included in earnable compensation. Coble v. Hollister, 57 Wn. App. 304, 788 P.2d 3 (1990). Pension plans are not gratuities, but instead are deferred compensation for services rendered. *934Dorward v. ILWU-PMA Pension Plan, 75 Wn.2d 478, 483, 452 P.2d 258 (1969).
DRS argues that its Presiding Officer properly ruled that the $4,500 increase in Hertzke’s salary in 1992 was not received as compensation for Hertzke’s personal services but, instead, was received as a payment in lieu of a fringe benefit, life insurance. Hertzke essentially argues that the life insurance was not a fringe benefit because he first requested that his employer make the life insurance payments and his employer did not provide it as an extra benefit outside of his salary. Hertzke argues that his salary increase was “earnable compensation” because when the life insurance payments ended, the District merely returned that portion of salary as wages for personal services.
We review de novo the agency’s conclusion of law that the payments Hertzke received were in lieu of a fringe benefit, the life insurance payments, and did not constitute “earnable compensation” for purposes of calculating his pension benefits. See Wilson, 87 Wn. App. at 201; see also RCW 34.05.570(3)(d). The agency’s conclusion is entitled to substantial weight. Towle, 94 Wn. App. at 204. The District and Hertzke’s characterization that they considered the $4,500 compensation for personal service at the time it was paid is not dispositive. See Coble, 57 Wn. App. 304.
The Presiding Officer’s conclusion is clearly supported by the statute and the applicable WAC provision amplifying the agency’s interpretation of the earnable compensation statute. Specifically, former WAC 415-112--410(3)(a) and (f) (1988) provide that earnable compensation does not include life insurance payments made by the employer or compensation in lieu of such life insurance payments. Further, former WAC 415-112-410(3)(j) provides that any payments “not” made in exchange for personal services cannot be included as earnable compensation. The express language of these WAC provisions delineates the type of payments that are excluded from earnable compensation.
Here, the District made life insurance payments for *935Hertzke for three years. Hertzke does not allege that these life insurance payments were “earnable compensation.” But he maintains that his salary increase after the payments stopped was earnable compensation. In 1992, the District ceased making life insurance payments and instead increased Hertzke’s salary by the same amount it had paid for the life insurance payments. But nothing in the record indicates that Hertzke undertook additional personal services in exchange for the $4,500 payment. To the contrary, the contract addendum said it was in lieu of life insurance payments, and there was a separate category for a six percent salary increase. There is substantial evidence to establish that the higher rate of salary was not compensation for “personal services”; rather, it was a salary increase in lieu of life insurance payments. Thus, we apply the clear language of former WAC 415-112-410(3)(a) that life insurance payments by an employer are not earnable compensation and cash paid in lieu of such payments is likewise not earnable compensation. The Presiding Officer did not err with respect to exclusion of the $4,500 payment from earnable compensation.
We reverse the superior court and affirm the Presiding Officer’s conclusions.
Hunt, A.C.J., and Houghton, J., concur.
RCW 41.32.240 through .575 governs TRS Plan 1 members.
Subsection (3) of WAC 415-112-515 has been recently amended, but subsection (2), at issue in this case, remains the same.
RCW 41.50.050(5) states in pertinent part: “The director shall... [a]dopt such rules and regulations as are necessary to carry out the powers, duties, and functions of the department pursuant to the provisions of chapter 34.05 RCW.”
The legislature also stated that the 1997 Act clarified existing statutory provisions regarding “separation from service and restrictions concerning postretirement employment!.]” Laws of 1997, ch. 254, § 1. The legislature provided that “[a]s a result of this act, the legal standard for determining separation from service and the impact to a retiree’s benefit should they return to work following retirement, are either the same as under the prior law, or less restrictive.” Laws of 1997, ch. 254, § 1.