             gm[I_q] -= gupdate;       
             gp[I_q] -= gupdate;
         }
-
-        __threadfence_block();
+    }
+
+    __syncthreads();
+
+    ifaces_x = mx + 1;  /* Visit x - edges of all non-ghost cells */
+    ifaces_y = my + 2;
+    num_ifaces = ifaces_x*ifaces_y;
+
+    for(thread_index = threadIdx.x; thread_index < num_ifaces; thread_index += blockDim.x)
+    { 
+        ix = thread_index % ifaces_x;
+        iy = thread_index/ifaces_x;
+
+        I =  (iy + mbc-1)*ys + (ix + mbc);  /* (ix,iy) = (0,0) maps to first non-ghost value */
+
+        for(mq = 0; mq < meqn; mq++)
+        {
+            I_q = I + mq*zs;
+
+            ql[mq] = qold[I_q-1];
+            qr[mq] = qold[I_q];
+
+            amdq[mq] = amdq_trans[I_q];
+            apdq[mq] = apdq_trans[I_q];
+        }            
+
+        for(imp = 0; imp < 2; imp++)
+        {
+            for(m = 0; m < maux; m++)
+            {
+                I_aux = I + m*zs;
+                k = imp*maux + m;
+                aux1[k] = aux[I_aux - ys + (imp - 1)];
+                aux2[k] = aux[I_aux      + (imp - 1)];
+                aux3[k] = aux[I_aux + ys + (imp - 1)];
+            }
+        }
+
+
+        /*     transverse-x
+    
+                |     |     | 
+                |     |     | 
+            ----|-----|--0--|-----
+                |     X--^  | 
+                |     X  q  |
+                |     X     |
+            ----|-----|-----|-----
+                |     |     |
+                |     |     |
+    
+        */              
+
+        rpt2(0,meqn,mwaves,maux,ql,qr,aux1,aux2,aux3,1,apdq,bmasdq,bpasdq);
 
         for(mq = 0; mq < meqn; mq++)
         {

            }
        }


        ifaces_x = mx + 2;  
        ifaces_y = my + 2*mbc - 1;
        num_ifaces = ifaces_x*ifaces_y;
        num_ifaces = ifaces_x*ifaces_y;

        for(thread_index = threadIdx.x; thread_index < num_ifaces; thread_index += blockDim.x)
        { 
            ix = thread_index % ifaces_x;
            iy = thread_index/ifaces_y;

            /* Start at first non-ghost interior cell */
            I = (iy + 1)*ys + ix;

            /* ------------------------------- X-directions --------------------------- */
            for(mw = 0; mw < mwaves; mw++)

        for(thread_index = threadIdx.x; thread_index < num_ifaces; thread_index += blockDim.x)
        {
            ix = thread_index % ifaces_x;
            iy = thread_index/ifaces_x;

            I = (iy + 1)*ys + (ix + 1)*xs;  /* Start at one cell from left/bottom */

