updated for search query