if `@mode` is not a valid mode, then it'll throw an exception without question marks. I think we also need to check if passed `mode` is actuall a valid and registered mode.