use bool for connected flag