rewrite map.