private String read(MemoriCommand command) {
    MemoriEvent displayText;
    if (memoriCalendar.isEmpty()) {
      return MESSAGE_EMPTYFILE;
    } else {
      int index = command.getIndex();

      if (memoriCalendar.size() < index) {
        return LINE_INDEX_DOES_NOT_EXISTS;
      } else {
        displayText = memoriCalendar.get(index - 1);
        return displayText.read();
      }
    }
  }
  private String delete(MemoriCommand command, GoogleSync googleSync) {
    MemoriEvent event;
    if (memoriCalendar.isEmpty()) {
      return MESSAGE_EMPTYFILE;
    } else {
      int index = command.getIndex();
      // to implement getIndex in MemoriCommand that returns a String

      if (memoriCalendar.size() < index) {
        return LINE_INDEX_DOES_NOT_EXISTS;
      } else {
        event = memoriCalendar.get(index - 1);
        memoriCalendar.remove(index - 1);
        googleSync.executeCommand(event, command);
        return String.format(MESSAGE_DELETE);
      }
    }
  }
  private String update(MemoriCommand command, GoogleSync googleSync) {
    MemoriEvent originalEvent;
    if (memoriCalendar.isEmpty()) {
      return MESSAGE_EMPTYFILE;
    } else {
      int index = command.getIndex();

      if (memoriCalendar.size() < index) {
        return LINE_INDEX_DOES_NOT_EXISTS;
      } else {
        originalEvent = memoriCalendar.get(index - 1);
        originalEvent.update(
            command.getName(),
            command.getStart(),
            command.getEnd(),
            command.getDescription(),
            command.getLocation());
        googleSync.executeCommand(originalEvent, command);
        return String.format(MESSAGE_UPDATE, index);
      }
    }
  }