added plots and plot code