private function traverse($id, $level = -1)
    {
        $lft = $this->count;
        ++$this->count;
        if (isset($this->parents[$id])) {
            foreach ($this->parents[$id] as $child) {
                $this->traverse($child, $level + 1);
            }
            unset($this->parents[$id]);
        }
        $rgt = $this->count;
        ++$this->count;
        $this->update[$id] = array('level' => $level, 'lft' => $lft, 'rgt' => $rgt);
    }