Write the packets appropriately