encapsulates getMatches function