can calculate multiple pathlengths