public function spec($spec, $value = null)
    {
        $key = "$spec";
        if (array_key_exists($key, $this->spec)) {
            return $this->spec[$key]; // return since spec is already cached
        }
        // cache a spec
        if (!is_null($value)) {
            return $this->spec[$key] = $value;
        }

        if (is_string($spec)) {
            $spec = new CK\MARCspec\MARCspec($spec);
        }

        $this->spec[$key] = $spec;
        $cmp = $this->spec[$key]->__toString();
        if ($cmp !== $key) {
            $this->spec[$cmp] = $this->spec[$key];
        }

        return $this->spec[$key];
    }