Added save map function