updated to use unified parameter_value function