Now works for n participants! Added TODO