add Paths API and DFS alg