refined ad_search functionality