figured out the portfolio array problem