add function of rand_range