initial logic to save map
more save map logic