added neural network algorithm