MISSOURICAPITOLJEFFERSON CITY, Mo. (AP) — The Missouri Department of Transportation says its worst-case scenario has been avoided.

The department had warned that by 2017 the state wouldn’t have enough money to fully maintain three-quarters of its roads. But the department’s latest financial forecasts show the situation improving.

Tax revenue is up thanks partly to cheaper gas prices. And the first federal highway legislation in more than seven years has guaranteed money for transportation that Missouri hadn’t planned on.

Transportation department Director Patrick McKenna says the state now expects to be able to maintain all its roads in their current condition and prevent the number of bridges in critical condition from rising.

The department plans to tap into savings and use some creative accounting to drawn down all the federal money to which it’s entitled.