review the code, add functions like restore and import