finished svm.hpp