worked on swapDates