works with compounding intervals