working version of regression version of Neural Network