update run_analysis.R and add test.R