added forward function to neuron