refactor filter mapping