improve connection manager