contour detection works