path finding source code