A* search works