less error prone way to loop over processes.