improved filter for search