added code for plotting contours