 		double x;
 		double r;
 		double mrg = 0;
-		double pi = features[i]; // here only 1 feature!!!
-		double si = sigmas[i];
+		double mi = meas[i]; // here only 1 feature!!!
+		double ui = meas_unc[i];
 		for (int j=0; j<N_GH; j++) {
-			x = pi + c_rt2 * si * c_absc[j];
+			x = mi + c_rt2 * ui * c_absc[j];
 			r = rho(x, mu, var);
 			mrg += c_wts[j] * r;
 		}

	if (err != CUDA_SUCCESS) { return 1; }

	// Allocate data on CPU and load 
	thrust::host_vector<double> h_features(n*m);
	thrust::host_vector<double> h_sigmas(n*m);

	unsigned int seed = 98724732;
	double sigma_msmt = 3.;

		// log marginal likelhoods in parallel on all threads independently
		double* p_marg = thrust::raw_pointer_cast(&d_marg[0]);
		double* p_theta = thrust::raw_pointer_cast(&d_theta[0]);
		double* p_meas = thrust::raw_pointer_cast(&d_meas[0]);
		double* p_meas_unc = thrust::raw_pointer_cast(&d_meas_unc[0]);

		// cuda grid launch
		dim3 nThreads(512,1);
