finish ch6, random number generator class