modify toCurrency function