combined includeFilter and excludeFilter into one method