added pairwise selection code