Pair refactoring