add validation and logger