added delay check inside ISR