tested covariance calc and is right