added getDecimal function