rewrote random number generation of benchmark to be 'thread-safe'