Update message_factory.py