change error handling for non-categorical covariate