When NASA and other space agencies from around the world eventually send humans back to the moon in the coming decades, they’ll likely be doing so with a goal of establishing scientific settlements in the not-so-distant future. With that in mind, researchers are trying to figure out exactly where we will get vital supplies like water.

We know the moon has reserves of water, and it’s thought that it’ll be possible to process the lunar regolith — the top layer of material on the moon — to gather that water for use by astronauts.

However, the more water that’s hiding on the moon, the better, and a new study suggests there may be a whole bunch of it.

The study, conducted by researchers from the University of California, draws parallels between the moon and Mercury. A probe that traveled to Mercury and crashed into it revealed the presence of ice in its craters that are shadowed from the sun.

Mercury and the moon are different in many ways, but both have heavily cratered surfaces. Figuring out which craters are hiding reserves of ice might sound impossible, but by comparing the depth-to-diameter ratio of ice-filled craters on Mercury to craters on Earth’s moon, researchers can suss out which craters are more shallow than they should be given their size. It’s those craters that are likely to hold reserves of ice.

Putting 2 and 2 together, the team determined that many of the shadowed craters on the moon are likely to hold millions of tons of ice, which could come in handy for future moon missions.

However, actually converting that ice into a usable resource for space travelers is a problem still waiting for a solution.