adding recognize function