took out repeated code added to receive

made formPacket which will make a bye array packet out of the necessary
elements. working on receive specifically on the close functionality