completed analysis
updates to code order so knitr would run