Added repetitions and computing average time elapsed.