working perceptron