Margaret Flaherty appeals from a Superior Court judgment affirming the denial by the Contributory Retirement Appeal Board of her request to purchase more than ten years of State retirement credits.
The facts are not in dispute. Flaherty, a teacher certified in Massachusetts, first taught at the St. Ann School, a nonpublic school in the Dorchester section of Boston, from 1953 to 1959. She then taught from 1959 to 1974 at the Boston School for the Deaf, a nonpublic school whose pupils’ tuition was paid in full or in part by the Commonwealth. From 1975 to 1980, she taught *133for the EDCO program operating out of Newton North High School.2 Finally, Flaherty taught at Newton North High School (NNHS), a public high school, from 1980 until her retirement in August, 1993. When Flaherty began her employment at NNHS in 1980, she became a member of the Commonwealth’s public employees retirement system and began to accrue creditable service toward a State pension.
In June, 1993, prior to her retirement, Flaherty applied for the purchase of fourteen years of creditable service for her nonpublic school service under both G. L. c. 32, § 3(4A) and § 4(1)(p), the provisions of which are set forth below. She was informed by the Teachers’ Retirement Board (board) in August, 1993, that she could purchase a maximum of ten years of creditable service. Flaherty appealed and the board’s decision was affirmed by an administrative magistrate in December, 1994. In May, 1995, the Contributory Retirement Appeal Board (CRAB) affirmed and adopted the magistrate’s decision. Flaherty appealed CRAB’s decision to the Superior Court pursuant to G. L. c. 30A, § 14, and the judge affirmed CRAB’s decision in November, 1997.
Under G. L. c. 32, § 5(2)(a), the Commonwealth’s public employees receive retirement benefits based in part upon the years of “creditable service” an employee has rendered to the State. Employees are credited with such service after becoming members of the State retirement system through their public employment. G. L. c. 32, § 4(1)(a).
Sections 4(1)(p) and 3(4A) both provide that member schoolteachers may purchase additional creditable service for teaching services they previously rendered at nonpublic schools in the Commonwealth, thereby permitting such teachers to increase their retirement benefits. Section 4(1)(p) allows a teacher to purchase credit for service in a nonpublic school, if the tuition of the pupils taught was paid in part or in full by the State, with a maximum purchase of ten years of credit.3 Section *1343(4A) allows a teacher to purchase a credit for any nonpublic school service provided before January 1, 1973, with the credits purchased also not to exceed ten years.4 Section 3(4A) was added after § 4(1)(p) was already in existence.5
Flaherty claims that the board erred as a matter of law when it construed §§ 4(1)(p) and 3(4A) together to limit her purchase of creditable service to ten years. She contends that §§ 3(4A) and 4(1)(p) are unrelated to one another. Additionally, she argues that each section should be strictly construed according to its plain language, thereby entitling her to purchase ten years of creditable service separately under each section for a maximum total of twenty years.
The sections are not unrelated. Whether §§ 3(4A) and 4(1)(p) should be construed together turns on whether those sections concern related subject matter. See Kennedy v. Contributory Retirement Appeal Bd., 47 Mass. App. Ct. 425, 427 (1999). “Where two or more statutes relate to the same subject matter, they should be construed together so as to constitute a harmonious whole consistent with the legislative purpose.” Perez v. Bay State Ambulance & Hosp. Rental Serv., Inc., 413 Mass. 670, 678 (1992), quoting from Board of Educ. v. Assessor of Worcester, 368 Mass. 511, 513-514 (1975).
Both § 3(4A) and § 4(1)(p) relate to the same subject matter insofar as each section provides teachers who have taught in nonpublic schools with the ability to purchase retirement credits within specified limits. See Kennedy, 47 Mass. App. Ct. at 427 (G. L. c. 32, §§ 3[4] and 3[4A], related as both sections provide teachers with opportunity to purchase creditable service). Section 4(1)(p) extends the privilege to nonpublic schoolteachers who taught pupils receiving State funds. Section 3(4A) extends that same privilege to nonpublic schoolteachers and administrators who rendered services before January 1, 1973, regardless of whether their pupils received State funds. When the two *135related sections are construed together, the amount of creditable service that may be purchased by an eligible teacher is ten years, not twenty.
Contrary to Flaherty’s claim that the plain meaning of each section requires the cumulation of each section’s ten-year maximum, we conclude that the plain meaning of these statutory provisions, considered in context, allows a teacher to purchase a maximum of ten years of creditable service. “[I]t is a well-established canon of statutory construction that a strictly literal reading of a statute should not be adopted if the result will be to thwart or hamper the accomplishment of the statute’s obvious purpose, and if another construction which would avoid this undesirable result is possible.” Watros v. Greater Lynn Mental Health & Retardation Assn., 421 Mass. 106, 113 (1995). Applying Flaherty’s construction, those teachers who taught for ten years in a nonpublic school before January 1, 1973, and whose students received State funds, would be able to double their creditable service beyond the number of years of service actually rendered. Such a result would significantly favor nonpublic service over public service, and would be neither harmonious nor consistent with a legislative retirement scheme created for the benefit of public employees. “The Legislature, if we were to accept the plaintiff’s argument, intended to be less flexible, and therefore less generous, to teachers who had taught in public schools than to teachers who had taught in nonpublic schools.” Kennedy, 47 Mass. App. Ct. at 427-428. We decline to adopt a literal yet unreasonable statutory construction unintended by the Legislature. See Champigny v. Commonwealth, 422 Mass. 249, 251 (1996). Our view in this regard is buttressed by the fact that § 3(4A) was enacted after § 4(1)(p), when, presumably, the Legislature was aware of the creditable service limits already imposed by the latter section. See Green v. Wyman-Gordon Co., 422 Mass. 551, 554 (1996).
For these reasons we hold that Flaherty may purchase no more than ten years of creditable service under both §§ 4(1)(p) and 3(4A).
Judgment affirmed.
The parties’ briefs indicate that the tuition of the EDCO program students was not funded by the Commonwealth.
Section (4)(1)(p) states in relevant part that “[a]ny member of a contributory retirement system who is engaged in a teaching position . . . and who was previously engaged in teaching pupils in any non-public school in the commonwealth, if the tuition of all such pupils taught was financed in part or in full by the commonwealth may . . . establish such service as creditable service by depositing into the annuity savings fund of the system of which he *134is a member . . . with the maximum credit for service in such non-public schools not to exceed ten years.”
Section 3(4A) states in relevant part that “[a]ny member in service, or any member inactive on authorized leave of absence . . . and who was previously engaged in teaching pupils or as an administrator in a nonpublic school prior to [January 1, 1973,] may . . . pay into the annuity savings fund ... an amount equal to that which would have been withheld . . . had such service been rendered in a public school . . . with a maximum credit for service in nonpublic schools not to exceed ten years.”
St. 1992, c. 333, § 1, approved January 7, 1993.