support vector machines implementation