private Object handleSubn(Object tos, String id, String ref) {
      if (tos instanceof Header && ref != null && ((Header)tos).getSubmissionRef() == null) {
         ((Header)tos).setSubmissionRef(ref);
         return new Object(); // placeholder
      }
      else if (tos instanceof Header && ref == null && ((Header)tos).getSubmission() == null) {
         Submission submission = new Submission();
         ((Header)tos).setSubmission(submission);
         return submission;
      }
      else if (tos instanceof Gedcom && ((Gedcom)tos).getSubmission() == null) {
         Submission submission = new Submission();
         if (id != null) {
            submission.setId(id);
         }
         ((Gedcom)tos).setSubmission(submission);
         return submission;
      }
      return null;
   }