Converted search_url to function with many arguments