all recognition code