on detection of

adv.