added dynamicValue function