added scripts for R