refactored all doubles to BigDecimal