global factory and connection