             for(int i=0; i<D; i++) {
                 float sum = 0;
                 for(int j=0; j<=i; j++) {
-				  // printf("%d %d %f %f %f\n", i, j, *tSigma, tData[j], tMean[j]);
-				  sum += *tSigma * (tData[j] - tMean[j]); // xx[j] is always calculated since j <= i
-				  tSigma++;
+                  // printf("%d %d %f %f %f\n", i, j, *tSigma, tData[j], tMean[j]);
+                  sum += *tSigma * (tData[j] - tMean[j]); // xx[j] is always calculated since j <= i
+                  tSigma++;
                 }
 
                 discrim += sum * sum;
             }
 
             float d = log(tP) - 0.5 * (discrim + tLogDet + (LOG_2_PI*(float) D));
-			// printf("discrim: %f\n", discrim);
-			// printf("tP: %f\n", tP);
-			// printf("tLogDet: %f\n", tLogDet);
-			// printf("d: %f\n", d);
-			// printf("idx: %d\n", obs * T + component);
+            // printf("discrim: %f\n", discrim);
+            // printf("tP: %f\n", tP);
+            // printf("tLogDet: %f\n", tLogDet);
+            // printf("d: %f\n", d);
+            // printf("idx: %d\n", obs * T + component);
             output[obs * T + component] = d;
         }
     }
-	free(xx);
+    free(xx);
 }
 
 

  dim3 gridPDF(grid_x, grid_y);

  dim3 blockPDF(tune_info.data_per_block,
				tune_info.params_per_block);

  int sharedMemSize = compute_shmem(&data, &params,
									tune_info.params_per_block,
									tune_info.data_per_block);

  printf("number params: %d, number data points: %d\n",
		 tune_info.params_per_block, tune_info.data_per_block);
  printf("sharedMemSize: %d\n", sharedMemSize);
  printf("block: %d x %d, grid: %d x %d\n", blockPDF.x, blockPDF.y,
		 gridPDF.x, gridPDF.y);
  printf("nparams: %d\n", params.rows);

  mvnpdf_k<<<gridPDF,blockPDF,sharedMemSize>>>(data, params, d_pdf);


__device__ int next_multiple(int k, int mult) {
  if (k % mult)
    return k + (mult - k % mult);
  else
    return k;
}

__device__ float compute_pdf(float* data, float* params, int iD) {
