modified send_packet to send packet, not only header