add covariance computation to callbacks