move duplicate validation to validator