public function newInstance($id)
    {
        if (!isset($this->registered[$id])){
            throw new ComponentNotFoundException($id);
        }
        // create new object via factory
        $factory = $this->factories[$id] ?? null;
        if (!$factory || !is_callable($factory) || !method_exists($factory, '__invoke')){
            throw new FactoryNotFoundException($id);
        }
        // get current slot
        $slot = $this->slots[$id] ?? new Slot($id);
        // callback factory to get new instance
        $newInstance = $this->callbackFactory($id, $slot, $factory);
        return $newInstance;
    }