added newlines to R code