 			{
 				if (tid == 16)
 				{
-					temper[tid + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd-1]-temper[tid+shft_rd]) + temper[tid+shft_rd]);
+					temper[tid + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd-1]-temper[tid+shft_rd]) + temper[tid+shft_rd];
 				}
-				elseif (tid == 17)
+				else if (tid == 17)
 				{
-					temper[tid + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd+1]-temper[tid+shft_rd]) + temper[tid+shft_rd]);
+					temper[tid + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd+1]-temper[tid+shft_rd]) + temper[tid+shft_rd];
 				}
 				else
 				{


	right[gid] = sR[tid];
	left[gid] = sL[tid];
	__syncthreads();

	}

}

__global__ void downTriangle(REAL *IC, REAL *right, REAL *left)
{


		t_eq += (TS*17);

		if (true)
		{
			cudaMemcpy(T_final, d_IC, sizeof(REAL)*dv, cudaMemcpyDeviceToHost);
			fwr << t_eq << " ";

			for (int k = 0; k<dv; k++)
			{
				fwr << T_final[k] << " ";
			}
			fwr << endl;
		}
		// Some condition about when to stop and write out values.

	}

	double wall1 = clock();
