change factoryIdToFactory to not be implicit