moved ports and port load balancing to its own method