first version of the classifier with training part