update map, and copy