temp
refactored the restore from archive functions and added some testing