add check for expected keys in balances object