added test for random number generator