refactoring due to hook feature