move validation code