search query and callback function