changed pathfinding algo