enabled resuming feature and added code to save timstamp