 +  int const instID = getIlluminaFieldID(ilm18Inst, qn, s);
 +  if (instID != -1) {
 +    uint64_t vr = strtol(s+1, &endp, 10);
-+    if ((s+1 < endp && ':' == *endp) || vr <= ILM18_MAX_RUN){ // v is run id
++    if ((s+1 < endp && ':' == *endp) && vr <= ILM18_MAX_RUN){ // v is run id
 +      char * endp2;
 +      endp2 = index(endp+1, ':');
 +      if (endp+1 < endp2 && ':' == *endp2){ // v is flowcell id

+  uint64_t const org =  (qnameid & (((1UL<<SRA_BITS_ORG) - 1)<<(SRA_BITS_ACC+SRA_BITS_SPOT)))>>(SRA_BITS_ACC+SRA_BITS_SPOT); 
+  //               12345678901234567890		20 digits
+  //  ULONG_MAX    18446744073709551615 UL
+  if (l_qname < 3/*xRR*/+20+1/*.*/+20+1) {
+    fprintf(stderr, "(E) length of string buffer %ld must be >=%d\n", l_qname, 3+20+1+20+1);
+    exit(-1);
+  }
+  int n = 3;
+  str[0] = (org==0 ? 'S' : (org==1 ? 'E' : 'D'));
+  str[1] = 'R';

+        if (flowcellID != -1) {
+          char * endp3;
+          uint64_t vl = strtol(endp2+1, &endp3, 10);
+          if ((endp2+1 < endp3 && ':' == *endp3) && vl <= ILM18_MAX_LANE){ // v is lane 
+            char * endp4;
+            uint64_t vn = strtol(endp3+1, &endp4, 10);
+            if (endp3+1 < endp4 && vn <= ILM18_MAX_TILE){ // v is tile 
+              char * endp5;
+              uint64_t vx = strtol(endp4+1, &endp5, 10);
+              if (endp4+1 < endp5 && vx <= ILM18_MAX_X){ // v is x 
+                char * endp6;
+                uint64_t vy = strtol(endp5+1, &endp6, 10);
+                if (endp5+1 < endp6 && vy <= ILM18_MAX_Y){ // v is y 
+    	          // | instrument id | run no. | flowcell | lane no. | tile no. | x       | y       | 
+    	          // |       2 bits  | 8 bits  | 2 bits   | 5 bits   | 14 bits  | 17 bits | 20 bits |
+      	          c = ((uint64_t)instID)<<(ILM18_BITS_RUN+ILM18_BITS_FLOW+ILM18_BITS_LANE+ILM18_BITS_TILE+ILM18_BITS_X+ILM18_BITS_Y)
