wait for interrupt handler; added comments