refactored addFilter method, again