 __global__ void k_sigmoidGradient_f( floatType_t  *array,
                                      int    const size )
 {
+
+/* setup global threadID in X direction */
+
   int tid = blockDim.x * blockIdx.x + threadIdx.x;
+
   if( tid < size )
+  {
+
+/* use the sigmoidGradient_f function to complete this loop */
+
     array[tid] = sigmoidGradient_f( array[tid] );
+
+  } /* end if */
 } /* end sigmoidGradient */
 
 /* kernel to set the delta3 vector from Y properly 

                                int         const Xexamples,
                                int         const size )
{
  int tidx = blockDim.x * blockIdx.x + threadIdx.x;
  int tidy = blockDim.y * blockIdx.y + threadIdx.y;

  if( tidy < Xexamples && tidx < size )
    delta2[INDX(tidx,tidy,size)] *= z2[INDX(tidy,tidx,Xexamples)];
} /* end k_updateDelta2 */

/* kernel for calculating the sigmoid of an array */

                               floatType_t const *a3,
                               int         const  Xexamples )
{

/* setup global threadID in X direction */

  int tid = blockDim.x * blockIdx.x + threadIdx.x;

  if( tid < Xexamples )
  {
    delta3[INDX((int)Y[tid],tid,11)] = (floatType_t) 1.0;
