moving portfolio code out from layout