added AStar algorithm