add search query handling