modify mq.py