get categorical variables working