removed the foreach from updateProcessStates