Added new Rscript code