added previousMap property for Map class

Now map is able to remember what was before the change was made to it.