distinct intersect and test