finalization of the map