re-organize connection manager