Adds masks for intersections