algo works, need to get three paths working + pathlengths