     // Read in the first file
     ////////////////////////////////////////////////////////////////////////////
 
-    fscanf(infile0, "%d", &NUM_GALAXIES);
-
-    int size_of_galaxy_array = NUM_GALAXIES * sizeof(float);    
-    printf("SIZE 0 # GALAXIES: %d\n",NUM_GALAXIES);
+    fscanf(infile0, "%d", &NUM_GALAXIES0);
+
+    int size_of_galaxy_array = NUM_GALAXIES0 * sizeof(float);    
+    printf("SIZE 0 # GALAXIES: %d\n",NUM_GALAXIES0);
 
     h_alpha0 = (float*)malloc(size_of_galaxy_array);
     h_delta0 = (float*)malloc(size_of_galaxy_array);
     float temp0, temp1;
 
-    for(int i=0; i<NUM_GALAXIES; i++)
+    for(int i=0; i<NUM_GALAXIES0; i++)
     {
         fscanf(infile0, "%f %f", &temp0, &temp1);
         h_alpha0[i] = temp0/scale_factor;

    // Read in the second file
    ////////////////////////////////////////////////////////////////////////////

    fscanf(infile1, "%d", &NUM_GALAXIES);
    printf("SIZE 1 # GALAXIES: %d\n",NUM_GALAXIES);

    h_alpha1 = (float*)malloc(size_of_galaxy_array);
    h_delta1 = (float*)malloc(size_of_galaxy_array);

    for(int i=0; i<NUM_GALAXIES; i++)
    {
        fscanf(infile1, "%f %f", &temp0, &temp1);
        h_alpha1[i] = temp0/scale_factor;

    float *d_alpha1, *d_delta1;
    float *h_alpha1, *h_delta1;

    int NUM_GALAXIES0;
    int NUM_GALAXIES1;

    //////////////////////////////////////////////////////////////////////
    // Read in the galaxy files.
