protected function set_theme($theme = null, $type = 'active')
	{
		// set the theme if given
		if ($theme !== null)
		{
			// remove the defined theme asset paths from the asset instance
			empty($this->active['asset_path']) or $this->asset->remove_path($this->active['asset_path']);
			empty($this->fallback['asset_path']) or $this->asset->remove_path($this->fallback['asset_path']);

			$this->{$type} = $this->create_theme_array($theme);

			// add the asset paths to the asset instance
			empty($this->fallback['asset_path']) or $this->asset->add_path($this->fallback['asset_path']);
			empty($this->active['asset_path']) or $this->asset->add_path($this->active['asset_path']);
		}

		// and return the theme config
		return $this->{$type};
	}