updated neural net with a few tweaks

I think the bug still lies somewhere in here.