optimize code
add has-filter method

experimental
optimize code
update unit tests