added address sanity checking to get_balances