Adding initial filtering logic.