Implemented the interrupt behaviour, untested