included send packet function