Partner basis calculation help!!!

I am studying for Reg exam and I cam across this question: Gray is 50% partner in Fabco partnership. Gray's tax basis in Fabco at the beginning of the year was $5,000. Fabco made no distributions to the partner during the year and recorded the following: Ordinary income: $20,000 Tax exempt income: $8,000 Portfolio income: $4,000 What's Gray tax basis in Frabco at the end of the year? The answer is $21,000 My only question is about the formula to calculate the Partner basis: Beginning capital account +% of all income -%all losses - withdrawals = ending capital income +% recourse liabilities = year -end basis. I believe that "income" includes ordinary, capital, and tax-free. I wonder why in the above question they included portfolio income in calculation? Thanks in advance for explanation.