implemeted sets saving during training