added plotting code and image for plot1