private void historyBack(int a) {
    if ( myThread.isPaused () ) {
      if ( a != moveStorage.size () - 1 ) {
        undoUntilButton.setText (UNDO_UNTIL_BUTTON_TEXT);
        undoUntilButton.addMouseListener (undoUntilButtonListener);
        undoUntilButton.setVisible (true);
        undoButton.setVisible (false);
      }
      else {
        undoUntilButton.setVisible (false);
        undoButton.setText (UNDO_BUTTON_TEXT);
      }

      // TODO: no continue button, if game already over!
      continueButton.setText (CONTINUE_BUTTON_TEXT);
      continueButton.addMouseListener (continueButtonListener);
      continueButton.setVisible (true);
    }
    board = new Board ();
    if ( a < 0 ) {
      myBoard.setBoard (board);
    }
    else {
      for (int i = 0; i < a; i++) {
        board.makeMove (moveStorage.get (i));
      }
      myBoard.setBoard (board);
    }
    boardPanel.revalidate ();
    frame.repaint ();
  }