code: public void updateEvent(String key, String value) {
          updateEvent(key, value, true, true);
      }
docs: Update the current event with given key and value, if current event not
  available, add a new one into array
  
  @param key The variable's key for a event
  @param value The input value for the key