added perf improvement to the findDeadParticle subroutine