   float timeTaken;
   cudaEventElapsedTime(&timeTaken, startEvent, endEvent);
 
-  const datafloat avgTimePerTest = timeTaken/((datafloat) Ntests);
-
+  const datafloat avgTimePerTest = timeTaken/(1000.f*(datafloat) Ntests);
+  printf("average time per test = %g\n", avgTimePerTest);
+
+  // output summation result
+  printf("sum total = %g\n", psum);
+  
   // free device arrays
   cudaFree(c_u);
   cudaFree(c_partialsum);

  datafloat *h_partialsum;

  // number of thread-blocks to partial sum u
  int B = (N+BDIM-1)/BDIM;

  // allocate host array
  h_partialsum = (datafloat*) calloc(B, sizeof(datafloat));

  // allocate device arrays
  cudaMalloc((void**) &c_u  , N*sizeof(datafloat));
  cudaMalloc((void**) &c_partialsum , B*sizeof(datafloat));

  // copy from h_u to c_u (HOST to DEVICE)
  cudaMemcpy(c_u ,  h_u ,  N*sizeof(datafloat), cudaMemcpyHostToDevice);

  datafloat *h_u   = (datafloat*) calloc(N, sizeof(datafloat));
  
  // initialize host array
  for(int n = 0;n < N; ++n){
    h_u[n] = 1;
  }

  // Solve discrete Laplacian
  sum(N, h_u);

  // Free the host array
  free(h_u);
