Added code for correspondence recognition