refactor backupWallet