added open_search function