add checkConnect method