public function undo()
    {
        end($this->history);
        for ($i=0; $i<$this->history_offset; $i++) {
            prev($this->history);
        }
        $index = prev($this->history);
        if (!empty($index)) {
            $this->current_passage = $index;
            $this->history_offset++;
            $this->storyline = array_slice($this->storyline, 0, -1);
            return $this->getCurrentPassage();
        }
        return false;
    }