Created functions for random number