added A* pathfinding