Updated to new search function