adjusted svm functions for multiple phi methods