added fields for displaying contours/images. compressed if statement