added currency2value function