trying to implement perceptron