date handling revised