moved serialization and deserialization to the Message object. TODO: logger object in Message creation