added the ability to pass in a random value