What makes a planet potentially habitable