implemented categorical variable