adding more calculations.. need to check covariance matrix