 
   //printf("Data created");
 
-  unsigned char* region = grow_region_serial(data);
+  unsigned char* region = grow_region_gpu(data);
 
   //printf("Region grown");
 

  cudaMalloc( (void**)&finished_device, sizeof(int));
  cudaMemcpy( data_device, data, DATA_DIM*DATA_DIM*DATA_DIM*sizeof(unsigned char), cudaMemcpyHostToDevice);
  cudaMemcpy( region_device, region, DATA_DIM*DATA_DIM*DATA_DIM*sizeof(unsigned char), cudaMemcpyHostToDevice);
  cudaMemcpy( finished_device, finished, sizeof(int), cudaMemcpyHostToDevice);

  dim3 dimBlock( 8, 8, 8 );
  dim3 dimGrid( 64, 64, 64 );

  while(finished > 0){

    region_grow_kernel<<<dimGrid, dimBlock>>>(data_device, region_device, finished_device);
    cudaMemcpy( finished, finished_device, sizeof(int), cudaMemcpyDeviceToHost);

  }

  return region;
  }


unsigned char* grow_region_gpu(unsigned char* data){
  unsigned char* region = (unsigned char*)calloc(sizeof(unsigned char), DATA_DIM*DATA_DIM*DATA_DIM);
  int* finished = (int*)malloc(sizeof(int));
    finished[0] = 0;

  int3 seed = {.x=50, .y=300, .z=300};
  region[seed.z *DATA_DIM*DATA_DIM + seed.y*DATA_DIM + seed.x] = 2;
