private void recreateChoices(StringMatchingQuestion question) {
   question.clearSourceElement();
   question.clearTargetElement();
   System.out.println("Choices on the left side:");
   int numLeft = io.requestChoiceNumber();
   List<String> choicesLeft = io.requestMultipleStrings(numLeft, false);
   System.out.println("Choices on the right side:");
   int numRight = io.requestChoiceNumber();
   List<String> choicesRight = io.requestMultipleStrings(numRight, false);
   for (String s : choicesLeft) {
     question.addSourceElement(s);
   }
   for (String s : choicesRight) {
     question.addTargetElement(s);
   }
   enforceModify = true;
 }
 @Override
 public void modify(Question question) {
   super.modify(question);
   StringMatchingQuestion q = (StringMatchingQuestion) question;
   if (io.requestYesOrNo("Do you want to modify the number of the items available?")) {
     recreateChoices(q);
   } else if (io.requestYesOrNo("Do you want to modify the choices?")) {
     System.out.println(q.choicesToString());
     if (io.requestYesOrNo("Do you want to modify the choices on the left side?")) {
       int choice = io.requestSingleChoice("Enter choice number:", false);
       if (q.hasSourceElement(choice)) {
         q.setSourceElement(choice, io.requestString("Enter new content for this choice:"));
       } else {
         System.out.println("This choice doesn't exist");
       }
     }
     if (io.requestYesOrNo("Do you want to modify the choices on the right side?")) {
       int choice = io.requestSingleChoice("Enter choice number:", false);
       if (q.hasTargetElement(choice)) {
         q.setTargetElement(choice, io.requestString("Enter new content for this choice:"));
       } else {
         System.out.println("This choice doesn't exist");
       }
     }
   }
 }