New changes for connection.py