 			#ifdef DEBUG
 			printf("*******invoke updateTheta with batch_size: %d, batch_offset: %d.\n", batch_size, batch_offset);
 			#endif
-			updateTheta(batch_size, batch_offset, xx, yTXT, thetaT, handle, m,  n,  f,  nnz,
-					devPtrXXHost, devPtrYTXTHost);
+			updateXWithCGHost(xx, &thetaT[batch_offset*f], &yTXT[batch_offset*f], batch_size, f, 6);
+
+			//updateTheta(batch_size, batch_offset, xx, yTXT, thetaT, handle, m,  n,  f,  nnz,
+			//		devPtrXXHost, devPtrYTXTHost);
 			#ifdef DEBUG
 			printf("\tupdateTheta run seconds: %f \n", seconds() - t0);
 			#endif

		cudacall(cudaFree(csrRowIndex));
		cudacall(cudaFree(csrColIndex));
		cudacall(cudaFree(ythetaT));
		
		#ifdef DEBUG
		gettimeofday(&start_tv, NULL);
		printf("---------------------------------- ALS iteration %d, update theta ----------------------------------\n", iter);

			#endif
			
			//updateXWithCG(1, batch_offset, ythetaT, tt, XT, handle, m, n, f, nnz);
			updateXWithCGHost(tt, &XT[batch_offset*f], &ythetaT[batch_offset*f], batch_size, f, 6);
			//updateX(batch_size, batch_offset, ythetaT, tt, XT, handle, m, n, f, nnz, devPtrTTHost, devPtrYthetaTHost);
			#ifdef DEBUG
			printf("\tupdateX run seconds: %f \n", seconds() - t0);
