added a handling of dates