finished setRand()