update the hook