implement match scoring