tweak setIntersection algorithm