edited message_passing.py