updated search and sort