modifications to constructPacket meant  a slight change of operation