fixing after filter and added tests for filters