renamed player to portfolio and refactored