improved interrupt handler
new script version