added isConnected public method