move validation to new module