detects next impulse