added Date date = dateTime in line 1098 to handle the dates