corrected to run on parallel systems