driver hooks refactoring