updated value_mapping api to be more consistent