used coreFoundation API for connection