Updated for new packet structure