Here’s an idea for retired coal mines: Turn them into giant batteries.

The mine-turned-battery concept relies on something called “pumped hydro.” Basically, when you have extra power you want to store, you just use it to pump water uphill. When you want to use that power again, you release the water to flow back downhill, spinning a turbine to generate electricity.

It turns out the structure of coal mines is perfect for building these systems: Water can be cycled between reservoirs deep in the mine and holding ponds at the surface.

But, like all nice things, pumped hydro can be pretty pricey. In Virginia, where two energy companies are looking to build pump systems near old mines, Gov. Terry McAuliffe signed a bill allowing the companies to raise electricity rates to help get the projects up and running.

Still, pumped storage is more reliable than chemical batteries like lithium ion, which degrade over time. As more solar is added to the grid — and the need for electricity storage ramps up — giant coal-mine batteries could just keep going and going right into the future.