finish SVM