Added custom random number generator