update connection.cpp file