Updated the pathfinding