cleaned up SVM