added sofia_search function