filtering now working properly again (TODO: extend test coverage)