Updated random min max int function.