petit refactor