adding SVM functions