score match logic