added save as svg portion ot the R script