 
 	// calculate initial value of characteristics
 	template <class ChiType> __global__
-	void virtual InitialValue(double* chi, double* meas, double* meas_unc, double* cholfact,
-			double* logdens_meas, double* logdens_pop, int ndata, int mfeat, int pchi)
+	void virtual InitialValue(double* chi, double* meas, double* meas_unc, double* cholfact, double* logdens_meas)
 	{
 		int idata = blockDim.x * blockIdx.x + threadIdx.x;
-		if (idata < ndata)
+		if (idata < c_ndata)
 		{
-			for (int j = 0; j < pchi; ++j) {
-				chi[idata + j * ndata] = 0.0; // initialize chi values to zero
+			for (int j = 0; j < c_pchi; ++j) {
+				chi[idata + j * c_ndata] = 0.0; // initialize chi values to zero
 			}
 
 			// set initial covariance matrix of the chi proposals as the identity matrix
 			int diag_index = 0;
-			for (int j=0; j<pchi; j++) {
-				cholfact[idata + ndata * diag_index] = 1.0;
+			for (int j=0; j<c_pchi; j++) {
+				cholfact[idata + c_ndata * diag_index] = 1.0;
 				diag_index += j + 2;
 			}
 		}
-		// calculate initial log-posteriors
+		// TODO: calculate initial log-posteriors
+		curandState localState;
+		ChiType Chi(&localState, 1);
+		logdens_meas[idata] = Chi.logdensity_meas(chi, meas, meas_unc);
 	}
 
 	// Initialize the parallel random number generator state on the device

		double* p_logdens_meas = thrust::raw_pointer_cast(&d_logdens_meas[0]);
		double* p_logdens_pop = thrust::raw_pointer_cast(&d_logdens_pop[0]);
		int* p_naccept = thrust::raw_pointer_cast(&d_naccept[0]);

		// launch the kernel to update the characteristics on the GPU
		UpdateKernel<ChiType><<nBlocks,nThreads>>>(p_meas, p_meas_unc, p_chi, p_cholfact, p_logdens_meas, p_logdens_pop,
				p_devStates, current_iter, p_naccept);

        CUDA_CHECK_RETURN(cudaDeviceSynchronize());

	curandState& state;
	// MCMC sampler parameters
	int current_iter;
};

#endif /* PARAMETERS_CUH_ */
