added getting trainingdata to classifier