cost augmented perceptron, but slow