finalized the restore operation in control unit (need to be tested more accurately)