svm code written [NOT TESTED]