add plots and R code