sample code of neural network and backpropagation