pairwise model