half refactoring