close to fixing edit button, refactored portfolio_controller