fixed getLengths
implemented link lengths for N=8, N=53