refactored building of matches into a separate method from match fetching