working towards generic categorical variable