added example for random number generator