fixed the contour part