 
     //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;

        total_choices *= reel_weights[i];
    }

    //copy host possible lines to device possible lines
    printf("**Copying host possible lines to device possible lines\n");
    int *device_possible_lines = NULL;
    size_t size = sizeof(int) * NUM_LINES * NUM_REELS;
    cudaError_t error = cudaMalloc((void **)&device_possible_lines, size);
    if (error != cudaSuccess) {
    	printf("cudaMalloc device_possible_lines returned error code %d, line(%d)\n", error, __LINE__);
        exit(EXIT_FAILURE);

    }

    //copy device payout frequencies to host payout frequencies
    error = cudaMemcpy(payout_frequencies, device_payout_frequencies, num_symbols_per_reel_sq * sizeof(int), cudaMemcpyDeviceToHost);
    if (error != cudaSuccess){
        fprintf(stderr, "Failed to copy payout frequencies %d from device to host (error code %s)!\n", i, cudaGetErrorString(error));
        exit(EXIT_FAILURE);
