Moon once had an atmosphere: NASA study