         char * lineSegment = bigLine + tableOfLineStarts[i];
         /*PRINT(time, "i:%d\n", tableOfLineStarts[i]);*/
 
-        if (panypmatch(start, lineSegment, &d1, &d2)) 
+        if (panypmatch(start, lineSegment, &d1, &d2, &dlistid)) 
             PRINT(time, "%s", lineSegment);
-	}
-	
+	
+	}
 }
 
 void pMatch(State *start, char * bigLine, u32 * tableOfLineStarts, int lineIndex, int nstate, int time, char * postfix) {
-		//printCudaInfo(); 
-    
-	parallelMatch<<<1,1>>>(start,bigLine,tableOfLineStarts, lineIndex, nstate ,time, postfix);
-
-    cudaThreadSynchronize();
+
+	parallelMatch<<<256, 256>>>(start, bigLine, tableOfLineStarts, lineIndex, nstate ,time, postfix);
+	
+	cudaThreadSynchronize();
 
 	//TODO free states
     cudaError_t error = cudaGetLastError();


/* Add s to l, following unlabeled arrows. */
	__device__ inline void
paddstate(List *l, State *s, List *addStateList)
{	
	addStateList->n = 0;
	PUSH(addStateList, s);

}

/* Check for a string match at all possible start positions */
__device__ inline int panypmatch(State *start, char *s, List *dl1, List *dl2, int *dlistid) { 
	int isMatch = pmatch(start, s, dl1, dl2, dlistid);
	int index = 0;
	int len = 0; 
	char * sc = s;
