update by LJW for modify the connection management class