update code for Map