add A* algorithm