get_value_pos adapted