refactor invalide