Closer to implementation of the perceptron algorithm