change match to sum