added plot1 code