Refactored with a real validation.