replace pathfinding algorithm‎