for measuring the contour