added the plots and R code for generating the plots