finished route search algorithm