refactor to get_search