Porting covariance routines