use getNumVisibleParticles and not getParticles()
use getNumVisibleParticles and not getParticles()