dynamic max random number