extracted validation method into helper. tests pass