Changed toCurrency function