update search algorithm