added validation for dates