 
     //initialize expected value array, this will hold the expected value calculated by each thread
     printf("**allocing host expected values\n");   
-    size = num_symbols_per_reel * sizeof(double) * NUM_LINES;
+    size = num_symbols_per_reel_sq * sizeof(double) * NUM_LINES;
     double *expected_values = (double*) malloc(size);
     printf("**allocing device expected values\n");
     double *device_expected_values = NULL;


    //initialize device payout frequencies array
    printf("**allocing host payout frequencies\n");
    int *payout_frequencies = (int*) malloc(num_symbols_per_reel * sizeof(int));
    printf("**allocing device payout frequencies\n");
    int *device_payout_frequencies = NULL;
    error = cudaMalloc((void**)&device_payout_frequencies, num_symbols_per_reel * sizeof(int));
    if (error != cudaSuccess) {
        printf("cudaMalloc device_payout_frequencies returned error code %d, line(%d)\n", error, __LINE__);
        exit(EXIT_FAILURE);

    	fprintf(stderr, "Failed to launch calculateExpectedValue kernel (error code %s)!\n", cudaGetErrorString(error));
    	exit(EXIT_FAILURE);
    }

    //wait for all threads to finish
    cudaThreadSynchronize();

    //copy expected values from CUDA device to host memory
