changed ordering of manageHooks