refactored policy of message storage in packet, used unique_ptr