private function _expand_equation($matches) {
    $rolls = array();

    for ( $i = 0; $i < $matches['count']; $i++ ) {
      $rolls[] = mt_rand(1, $matches['sides']);
    }

    // save individual roll results
    $this->rolls[] = array(
        'notation' => $matches[0],
        'rolls' => $rolls
      );

    return "(" . implode(" + ", $rolls) . ")";
  }