changed random to atomicint without while