 	float temp = 0;
 	for(int i = 0; i < f; i++)
 		//this is math correct and coalesced because A is symmetric
-		temp += A[blockIdx.x*f*f + f*i + threadIdx.x]*x[blockIdx.x*f + i];
+		temp += A[blockIdx.x*f*f + f*i + threadIdx.x]*sharedx[i];
 	r[blockIdx.x*blockDim.x + threadIdx.x] = b[blockIdx.x*blockDim.x + threadIdx.x] - temp;
 	//p=r;
 	p[blockIdx.x*blockDim.x + threadIdx.x] = r[blockIdx.x*blockDim.x + threadIdx.x];

		#endif
		//x=x+alpha*p;
		x[blockIdx.x*blockDim.x + threadIdx.x] = 
			x[blockIdx.x*blockDim.x + threadIdx.x] + alpha[blockIdx.x] * p[blockIdx.x*blockDim.x + threadIdx.x];
        //r=r-alpha*Ap;
		r[blockIdx.x*blockDim.x + threadIdx.x] = 
			r[blockIdx.x*blockDim.x + threadIdx.x] - alpha[blockIdx.x] * ap[blockIdx.x*blockDim.x + threadIdx.x];

		}
		#endif
		//pAp=p'*Ap
		temp = sharedx[threadIdx.x]
				*ap[blockIdx.x*blockDim.x + threadIdx.x];
		temp = blockReduceSum(temp);
		if(threadIdx.x == 0){
