validation refactoring 2