Added more code, to get portfolio fixed and working correctly