add cpp code for comparison: find object