First (assumed) working version of 'computeMatches'