Add detection functions