merge refactoring