require single thread usage & initialize rnd number generator