Added random number generation functionality