implemented intersections with functions