added some validation and added date field