allow polygon to detect self intersections
first round global loop removal