remove unused R code