fixed preprocesing steps for train