Try using interrupts