started working on nn training loop