implementation of Neural Networks