support ranges for rand & rand_i