recognition loop