Adding another loop to join agents together.