     nChildren = (int)node[1];
     
     /* CAddTable + Narrow + LogSoftMax */
-    // accGradParam will use this as linearGradOutput 
-    // (we reuse the _multiBuffer Tensor)
+    // AKA linearGradOutput (we reuse the _multiBuffer Tensor)
     nodeGrad = logsoftOutput + maxFamilyPath*k + n; 
 
     for(int i = tx; i < nChildren; i+=i_step)

{
  THCudaTensor *input = (THCudaTensor*)luaT_checkudata(L, 2, "torch.CudaTensor");  
  THCudaTensor *gradOutput = (THCudaTensor*)luaT_checkudata(L, 3, "torch.CudaTensor");  
  THCudaTensor *target = (THCudaTensor*)luaT_checkudata(L, 3, "torch.CudaTensor");  
  int inputSize = luaT_getfieldcheckint(L, 1, "inputSize");
  int rootId = luaT_getfieldcheckint(L, 1, "rootId") - 1;
  int maxFamilyPath = (int)luaT_getfieldcheckint(L, 1, "maxFamilyPath");

  
  luaL_argcheck(L, gradOutput->nDimension == 1, 2, "1D tensor expected");
  
  THCudaTensor_resize2d(gradInput, input->size[0], input->size[1]);
  
  /* call cudakernel */
  dim3 blocks(input->size[0]); // each block is an example
  dim3 threads(SOFTMAXTREE_THREADS);
  cunnx_SoftMaxTree_updateGradInput_kernel<<<blocks,threads>>>(
    THCudaTensor_data(gradInput), THCudaTensor_data(logsoftOutput), 
    THCudaTensor_data(gradOutput), THCudaTensor_data(weight), 
    THCudaTensor_data(bias), THCudaTensor_data(target), 
