Porftolio loop now working, needs code review