added AStar functionality