update run_analysis.R to wrap in a function call