revised R markdown file