updated code to use the MQX IRQ handling API's