move synchronize_account logic to account.py