change define_value data structure
add return range value
perfect rangeValue function