merged refactoring