revising code for Rmarkdown version