moved modal loop into portfolio loop