public function setMetaData(string $serviceName, string $key, array $values)
    {
        // make sure the service exists
        if (!$this->has($serviceName)) { 
            throw new UnknownServiceException('There is no service named "' . $serviceName . '" specified.'); 
        }

        // make sure all elements are arrays
        foreach($values as $value) 
        {
            if (!is_array($value)) {
                throw new ContainerException('Every meta data value must be an array. "' . gettype($value) . '" given.');
            }
        }

        // make sure the metadata key is allocated
        if (!isset($this->metadata[$key])) {
            $this->metadata[$key] = [];
        }

        // write
        $this->metadata[$key][$serviceName] = $values;
        $this->linkMetaService($serviceName, $key);
    }