construct perceptron class that has basic functions which neural units should hava