modify packet_process func