public List<DateWithDayCount> calculateFixingDates(List<DateWithDayCount> adjustedDates, ResetDates resetDates, HolidayCalendarContainer allCalendars) {
    HolidayCalendarContainer resetCalendars = new HolidayCalendarContainer(allCalendars, resetDates.getResetDatesAdjustments().getBusinessCenters());
    RelativeDateOffset initialFixingDate = resetDates.getInitialFixingDate();
    RelativeDateOffset fixingDates = resetDates.getFixingDates();
    HolidayCalendarContainer initialFixingCalendar = initialFixingDate == null ? null : new HolidayCalendarContainer(allCalendars, initialFixingDate.getBusinessCenters());
    HolidayCalendarContainer fixingCalendars = new HolidayCalendarContainer(allCalendars, fixingDates.getBusinessCenters());
    List<DateWithDayCount> result = new ArrayList<DateWithDayCount>(adjustedDates.size() - 1);
    boolean resetInArrears = resetDates.getResetRelativeTo() == ResetRelativeToEnum.CALCULATION_PERIOD_END_DATE;
    DateWithDayCount temp = new DateWithDayCount(0);
    for(int first = resetInArrears ? 1 : 0, i = first, last = adjustedDates.size() - (resetInArrears ? 1 : 2); i <= last; i++) {
      DateWithDayCount adjusted = adjustedDates.get(i);
      temp.setDayCount(adjusted.getDayCount());
      adjustDate(temp, resetDates.getResetDatesAdjustments().getBusinessDayConvention(), resetCalendars);
      boolean isInitialFixing = initialFixingDate != null && i == first;
      RelativeDateOffset offset = isInitialFixing ? initialFixingDate : fixingDates;
      shift(temp, offset.getPeriodMultiplier(), offset.getPeriod(), offset.getDayType(), offset.getBusinessDayConvention(), isInitialFixing ? initialFixingCalendar : fixingCalendars);
      // todo initial fixing date
      if(temp.compareTo(adjusted) == 0) {
        result.add(adjusted);
      } else {
        result.add(temp);
        temp = new DateWithDayCount(0);
      }
    }
    return result;

  }