broken attempt at running multiple trials to take the average. i hate callbacks