private static BigDecimal change(int[] coin_totals, BigDecimal balance, String remainderOf,
                                     int arrayIndex) {

        BigDecimal remainder = new BigDecimal(remainderOf);

        if(!balance.equals(ZERO_VALUE)) {

            BigDecimal monetary_remainder = balance.remainder(remainder);

            if (monetary_remainder.equals(ZERO_VALUE)) {
                balance = balance.subtract(remainder);
                coin_totals[arrayIndex]--;
            }

        }

        return balance;
    }