committed contour detection stuff