added while loops to send windows of packets at once. sws = 6