error handling with dates
merge