merged changes in from sparse_svm branch