fixed logic for storing and iterating over individual processes