update CApp::factory to CApp::instance