working rmd file for assignment 3