add working code for SVM plugin