petit refactoring