added pairwise analysis utils