@Override
    public void execute() {
        MainFrame mainFrame = MainFrame.getInstance();
        NoteEditorFrame noteEditorFrame = NoteEditorFrame.getInstance();
        List<Word> list = mainFrame.getList();

        String newEWord = noteEditorFrame.getNewValue();
        String newRWord = noteEditorFrame.getNewTranslation();
        Word newWord = new Word(newEWord, newRWord);

        int index = mainFrame.getIndex();
        Word oldWord = list.get(index);
        if (!newWord.equals(oldWord)) {
            mainFrame.setWord(newWord, index);
            mainFrame.setQuestion(newRWord);
        }

    }