improvement of get_value