update svm code