add validation and a date adjustment