added and corrected new method for svm training