improve ConnectinManager.py