added sample code for contours