reorganize manageHook