cleanup .map and .map_err