modified program structure, main should now handle all participants