server code fixed packetizing