added range_average