added categorical data encoder into preprocessing