made some changes in rscript.R