add some checking for input date format