small refactor of validator class