adding randomness generator