sets up random number generator