1st Perceptron implementation