working on R script