fix bug - put in r_min, r_max