similarity measure and first evaluation code