sorted the dates