work on network training
added train logic