updated rscript