refactored interrupthandler to use property for easier testing