Added dynamic pathfinding