finished run_a_single_trial, working on run_multiple_trials