new error function implemented and further covariance improvements