sorting out datestamps