Added a "triedList" to the path length function