improved the Pathfinding algorithm and the testing DLL