made releaseConnection simpler