add validation, refactor validation syntax