         
         if (unif_draw < ratio) {
             // Accept this proposal, so save this parameter value and conditional log-posterior
-            chi[i] = new_chi;
+            for (int j=0; j<c_p; j++) {
+                chi[n * j + i] = new_chi[j];
+            }
             logdens[i] = logdens_pop;
         }
 
         // Copy state back to global memory
         state[i] = localState;
 
-        // Finally, adapt the scale of the proposal distribution
+        // Finally, adapt the Cholesky factor of the proposal distribution
         // TODO: check that the ratio is finite before doing this step
         double decay_sequence = 1.0 / pow(current_iter, c_decay_rate);
-        jump_sigma[i] *= exp(decay_sequence / 2.0 * (ratio - c_target_rate));
+        
 	}
 }
 


// Function to compute the conditional log-density of the measurements given the chi value
__device__
double logdensity_meas(double* meas, double* meas_unc, int m, double* chi) {

    double normalization, beta, temperature;
    normalization = exp(chi[0]);

        // Copy variables to local memory for efficiency
        curandState localState = state[i];
        dim_cholfactor = c_p * c_p - ((c_p - 1) * c_p) / 2;  // cholesky factor is a lower-diagonal matrix
        double cholfactor[dim_cholfactor];
        for (int j=0; j<dim_cholfactor; j++) {
            cholfactor[j] = prop_cholfact[n * j + i];
        }

        // get the unit proposal
        double snorm_deviate[c_p];
        for (int j=0; j<c_p; j++) {
            snorm_deviate[j] = curand_normal_double(&localState);
        }
        
        // propose a new chi value
        double new_chi[c_p];
        cholfact_index = 0
        for (int j=0; j<c_p; j++) {
            double centered_proposal = 0.0;
