uploaded R code