new version of get_value method