Modified for latest mq