updated Cov function;