updating packet.cpp