optimize filter implementaion to show more accurate results