rewrite adaboost to work with svm