Added functions for random numbers