my improved version of perceptrons