finishing the perceptron part