run_analysis implementation