tweaked cx_connection.py