refactored for use validator and errorify helpers