more elegant handling of requiredHooks