refactor validators