Added HandlePacket method to states