 }
 
 /* Check for a string match at all possible start positions */
-__device__ inline int panypmatch(State *start, char *s, List *dl1, List *dl2) { 
-	int isMatch = pmatch(start, s, dl1, dl2);
+__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;


	List d1;
	List d2;	

	int i;
	for (i = blockIdx.x * blockDim.x + threadIdx.x; i < lineIndex; i += gridDim.x * blockDim.x) { 

        char * lineSegment = bigLine + tableOfLineStarts[i];
        /*PRINT(time, "i:%d\n", tableOfLineStarts[i]);*/

        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) {

	parallelMatch<<<256, 256>>>(start, bigLine, tableOfLineStarts, lineIndex, nstate ,time, postfix);
	
	cudaThreadSynchronize();

	//TODO free states
    cudaError_t error = cudaGetLastError();
