 		printf("%f\n", sample_mean_res[i]);
 	}
 	write_paths_to_csv("maxent_samples.csv", samples_res, nsamps_tot, N, "w");
+	write_paths_to_csv("maxent_cov.csv", sample_covariance_res, N, N, "w");
 
 
 	/* free memory */

	float *alpha_res = (float*)malloc(mean_size);
	float *beta_res = (float*)malloc(cov_size);
	float *sample_mean_res = (float*)malloc(mean_size);
	float *samples_res = (float*)malloc(samples_size);

	/* Allocate device memory */

	float *samples;
	float *alpha;
	float *beta;

	dim3 cov_block(N, N);

	cudaMalloc(&sample_mean, mean_size);
	cudaMalloc(&sample_covariance, cov_size);
