code added for ANN with variable number of nodes in the hidden layer