updated restore script