public void addHistory(HistoryElement element) {
      String expression = element.expression;
      history.remove(expression);
      history.put(expression, element);
    }
public void addHistory(HistoryElement element)