adding some R code snippets