added traing code to perceptron stuff, still nothing tested