Added save function for maps