class for working with neural network