changed for perceptron