dynamic packet length