changed order of datecheck