Added intersect function