last version of the R code