changed return type of trainNeuralNet and backProp