now with integration of the covariance matrix