ACCESS-82. hook code refactoring