added contour support