Modified hw3.Rmd - final