Adding run_analysis function