move MatchResult to upper-level and make it public