working on contour donut merges (not quite right yet)