update best_path