Added convertDecimal function