function that creates a random number from 0 to 1