refactored Perceptron.jl