irq refactored.