new search function with correct time