Added contour functionality