added arguments to covariance function