changed handling of dates