Works. Need A* algorithm