Refactor filter method to use request dict