changed everything to perceptron model