implemented behaviour analysis for categorical vars