refactoring ameliorant le code