improved documentation + code now correctly computes kappa for links