update pathfinding path
refactor