added compute_cov