simplified validator creation
refactored and reordered for clarity
remove dependency on deap