Svm code