implemented saving training to db onPause