ch6 random number generator