removed packet length byte and added send_packet function