added catch for less than 3 portals