add map and filter definition to rewrite