store packet function