added handling of dates