added code for plot1