Now handling matches with teams of arbitrary size