atomicMin function is added