added date validation