fixing neural net code to actually work