removed this part from inside the else to make dayIndex (and the table accordion) work again