refactored validator to have a better name