comparing dates improvment