added pairwise, but its not working