update example code with new packet specific events