Added possibility to include covariates