adding plot1 and R code