adding calculation of matches