Added formatDecimal function