match logic