Make a loop out of duplicate code in launch_clients()