added jsd tests and fixed pairwise