code comments for findInPaths()