made the calls to Random functions explicit