adding to R code...