added an else to assure connect