Update connect.cpp