changed random to atomicint