A new study finds pension systems for state government workers are in their best shape since the Great Recession. The Pew Charitable Trusts credits a booming stock market over the past year as well as states’ longer-term steps.

Those include boosting taxpayer contributions to public pension funds and reducing promised retirement benefits, particularly to newly hired workers.

A healthier pension system means states are less likely to have to raise taxes or cut basic government services to pay retiree benefits.

Illinois, Kentucky, New Jersey and Pennsylvania continued to have the most underfunded pension systems, although each has been trying to close the gap.