implement search algorithm