added SVM implementation and edited SVMachine class to fix bugs