singleMode and factoryMode