updated code for benchmarks