Updating random numbers and output