public function load($fname)
    {
        $this->fname = $fname;
        if (file_exists($this->fname)) {
            $contents = file_get_contents($this->fname);
            $this->data = json_decode($contents);
        } else {
            $this->data = json_decode("[]");
        }

        $data =& $this->data;
        return $data;
    }