implementation for ParticleSystem class