simple SVM code for small n