yes, that's code from compute_covariance