optimize the particle system