addFilter method and tests