Updated code to remove random number changes