mixin for interrupt handler