added data preparation for classification