rename hook name and refactoring to prepare for other hooks