changed search/filter logic