changes to helper functions; soon will rewrite rmd report