save and restore Map instance