    if (cGenre.toLowerCase().trim() == eGenre &&
        cName.toLowerCase().trim() == eName.toLowerCase() &&
        ('' + cYear) == ('' + eYear) && widget_state == 1.0) {
      core.endEpisode(1.0, true);
    } else {
      core.endEpisode(-1.0);
    }
  };

  // instruction
  d3.select('#query').html('Click on a "' + chosenElement + '" widget, and then search for <b>' + eGenre + '</b> movies directed by <b>' + eName + '</b> from year <b>' + eYear + '</b>.');
  // d3.select('#query').html('Search for <b>'