Complex implementation with BigDecimal