begin compare