modified code for the interrupter