     extern char *optarg;
     extern int optind, optopt, opterr;
     int c;
+    char *infilename0 = NULL;
+    char *infilename1 = NULL;
     char *outfilename = NULL;
     char defaultoutfilename[256];
     sprintf(defaultoutfilename,"default_out.dat");


    for(int i=0; i<NUM_GALAXIES1; i++)
    {
        fscanf(infile1, "%f %f", &temp0, &temp1);
        h_alpha1[i] = temp0/scale_factor;
        h_delta1[i] = temp1/scale_factor;
        //if (i<10)
        //printf("%e %e\n", h_alpha1[i], h_delta1[i]);
    }

//get device diagnostics


    float lo = hist_lower_range;
    float hi = 0;
    for(int k=0; k<nbins+1; k++)
    {
        if (k==0)
        {
            //fprintf(outfile, "Underflow below %.3e %s %lu \n", lo, ",",  hist_array[k]);
        }
        else
        {
