added R code to be evaluated