started to add code to handle interrupts