cleaned the benchmark function