add dev.off() for plot1 and plot2