added intersect functionality