fixed bug in covariates