add intersect function