refactor has-filter
update unit tests