public void filter(List<String> guessHistory, List<String> feedbackHistory) {
    Iterator<String> it = possibleAnswer.iterator();
    int i = feedbackHistory.size() - 1;
    if (i >= guessHistory.size()){
      return;
    }
    String gs = guessHistory.get(i);
    String fb = feedbackHistory.get(i);
    for (int count = 0; count < level && it.hasNext(); count++) {
      String code = it.next();
      String temp = CodeFeedback.getValidFeedback(code, gs);
      if (!temp.equals(fb)){
        it.remove();
        continue;
      }
    }
  }