Added code for plot1 and plot2