     clock_t begin, end;
     double time_spent = 0.0;
 
-
-    /* here, do your time-consuming job */
-
     char instr[80];
     char outstr[80];
     int i = 0;
 
     PPMImage images[301];
 
-    // for(i = 0; i < 301; i++) {
-    //     sprintf(instr, "infiles/baby001.ppm", i+1);
-    //     images[i] = *readPPM(instr);
-    // }
-
     PPMPixel *imageData_d, *outputData_d, *outputData_h;
+    // get filter for convolution
     Filter * filter_h = initializeFilter();
 
     cudaError_t cuda_ret;
 
+    // read in 301 frames
     for(i = 0; i < 301; i++) {
         sprintf(instr, "infiles/tmp%03d.ppm", i+1);
         images[i] = *readPPM(instr);
     }
+
     PPMImage *image;
     image = &images[0];
+    // malloc space for output data on host
     outputData_h = (PPMPixel *)malloc(image->x*image->y*sizeof(PPMPixel));
 
+    // malloc space for input and output on device
     cuda_ret = cudaMalloc((void**)&(imageData_d), image->x*image->y*sizeof(PPMPixel));
     if(cuda_ret != cudaSuccess) FATAL("Unable to allocate device memory");
 

    outImage->x = image->x;
    outImage->y = image->y;

    cudaMemcpyToSymbol(filter_c, filter_h, sizeof(Filter));
    cudaDeviceSynchronize();



    for(i = 0; i < 301; i++) {
        sprintf(outstr, "outfiles/tmp%03d.ppm", i+1);


    fclose(fp);
}

// Allocates memory and initializes a filter for 2D convolution
Filter * initializeFilter()
{
    int data[FILTER_SIZE * FILTER_SIZE] = {0, 0, 0, 0, 0,
