return error for validate function right away
move validate checks to separate test file