added multithreading to the benchmark.