changed callbacks to take packet_info structure