add avoid detection