public function addInstance(Curl $curlInstance, $name = null)
    {
        if ($name) {
            $this->curlInstances[$name] = $curlInstance;
        } else {
            $this->curlInstances[] = $curlInstance;
        }

        end($this->curlInstances);
        return key($this->curlInstances);
    }