added clear for detection