private List<Person> getFamilyMembers(Gedcom gedcom, List<? extends SpouseRef> memberRefs, boolean preferredFirst) {
      List<Person> members = new ArrayList<Person>();
      for (SpouseRef memberRef : memberRefs) {
         Person member = memberRef.getPerson(gedcom);
         if (member != null) {
            if (preferredFirst && "Y".equals(memberRef.getPreferred())) {
               members.add(0, member);
            }
            else {
               members.add(member);
            }
         }
      }
      return members;
   }