updated random number generation module