doing some restructuring of the interrupts, adding awaitevent