Refactor add new filter api.